Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a method and an apparatus for displaying a web page, an electronic device, and a storage medium.
In order to achieve the above purpose, one or more embodiments of the present disclosure provide the following technical solutions:
in one aspect, there is provided a web page display method including:
displaying the web pages of the sub-websites;
hiding a first web page navigation corresponding to a parent web site and displaying a second web page navigation corresponding to the child web site in the web page if it is detected that a first condition is satisfied;
displaying the first web page navigation and the second web page navigation in the web page if it is detected that a second condition is satisfied.
In another aspect, there is provided a web page display method including:
displaying a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to the child web site;
hiding the first web page navigation in the web page and maintaining display of the second web page navigation if it is detected that the first condition is satisfied.
In yet another aspect, there is provided a web page display apparatus including a web page display unit, a first execution unit, and a second execution unit;
the webpage display unit displays the webpage of the sub-website;
the first execution unit hides a first webpage navigation corresponding to a parent website in the webpage and displays a second webpage navigation corresponding to the child website when detecting that a first condition is met;
the second execution unit displays the first web page navigation and the second web page navigation in the web page when detecting that a second condition is satisfied.
In still another aspect, there is provided a web page display apparatus including a web page display unit and a web page navigation hiding unit;
the web page display unit displays a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to a child web site;
the web page navigation hiding unit hides the first web page navigation in the web page and maintains the display of the second web page navigation when detecting that a first condition is satisfied.
In yet another aspect, an electronic device is provided, comprising:
a processor;
a memory for storing processor-executable instructions;
the processor is configured to:
displaying the web pages of the sub-websites;
hiding a first web page navigation corresponding to a parent web site and displaying a second web page navigation corresponding to the child web site in the web page if it is detected that a first condition is satisfied;
displaying the first web page navigation and the second web page navigation in the web page if it is detected that a second condition is satisfied.
In yet another aspect, an electronic device is provided, comprising:
a processor;
a memory for storing processor-executable instructions;
the processor is configured to:
displaying a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to the child web site;
hiding the first web page navigation in the web page and maintaining display of the second web page navigation if it is detected that the first condition is satisfied.
In yet another aspect, a computer storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
displaying the web pages of the sub-websites;
hiding a first web page navigation corresponding to a parent web site and displaying a second web page navigation corresponding to the child web site in the web page if it is detected that a first condition is satisfied;
displaying the first web page navigation and the second web page navigation in the web page if it is detected that a second condition is satisfied.
In yet another aspect, a computer storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
displaying a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to the child web site;
hiding the first web page navigation in the web page and maintaining display of the second web page navigation if it is detected that the first condition is satisfied.
According to the technical scheme, when the webpage of the child website is displayed, whether the first webpage navigation corresponding to the parent website needs to be hidden in the webpage of the child website or not and the second webpage navigation corresponding to the child website needs to be displayed can be determined according to whether the detected condition is met or not, and after the first webpage navigation is hidden, the webpage display style can be more concise.
Detailed Description
A web site (web) refers to a collection of one or more web pages (webpages) for presenting specific content on the internet. A parent web site may contain one or more child web sites that may correspond to one or more child services under the parent web site. The parent website may contain one or more web pages, and the child website may also contain one or more web pages. The web page navigation (navigation) may include a plurality of web page links for accessing a particular web page, with each of the parent and child web sites having respective web page navigations in the form of, but not limited to: toolbar, drop down list, etc. Of course, the parent website and the child website may have no business relevance or parent and child business scores, such as: the reason is that a certain web page of a child web site (e.g. the main page of the child web site) needs to be accessed through a web page link in the web page navigation of the parent web site, so that the web page is determined as the parent web site and the child web site. The web page mentioned herein is not limited to the web page displayed by the browser, but includes web pages displayed by various Applications (APPs).
Fig. 1 is a flowchart illustrating a method for displaying a web page according to an exemplary embodiment, which may be applied to a User Equipment (UE). A UE may also be referred to by another term, such as a Mobile Station (MS), a User Terminal (UT), a Subscriber Station (SS), a Mobile Terminal (MT), or a wireless device. The UE may be fixed or mobile. UEs include, but are not limited to: computers, cell phones, Personal Digital Assistants (PDAs), watches, etc.
As shown in fig. 1, in an embodiment, a method for displaying a web page includes steps 101, 103, and 105. These steps will be described in detail below with reference to fig. 2 to 4.
In step 101, the web pages of the child web site are displayed.
The user may enter the address of a web page of a child web site (e.g., the main page of the child web site) in the address bar of the browser of the user device to access the web page. Or, the user may access the homepage of the parent website first, then find the web page link of a certain web page of the child website in the first web page navigation of the parent website, and may access the web page of the child website after clicking the web page link.
Fig. 2 is a schematic page diagram of the home page of an exemplary parent website. The home page 10 of the parent site may include a first web page navigation 11 and the content 12 of the parent site. In this example, the first webpage navigation 11 may include a non-public control area 110 and a public control area 112, wherein the non-public control area 110 may contain some webpage links (web page jump may be realized by operating the control 114) that may access homepages of various child websites under the parent website, and the public control area 112 may include some controls that may be commonly used by the parent website and the child websites. In addition, a corresponding drop down list 116 may appear by clicking on some of controls 114. Of course, the form of the first web page navigation is not limited thereto.
As shown in fig. 3, when the user accesses the homepage 10 of the parent website and clicks a certain web page link in the first web page navigation 11 in the homepage 10 of the parent website, the user can access the homepage 20 of a certain child website. In this example, the home page 20 of the sub-website displayed on the screen of the user device may include: a first web page navigation 11, a second web page navigation 13 and a display for displaying the content 22 of the sub web site. When the main page 20 of the sub-website is displayed, it is default that the first web page navigation 11 and the second web page navigation 13 are simultaneously displayed. Additionally, the second web page content 22 may also include secondary web page navigation 220 of the child web site.
In step 103, if it is detected that the first condition is satisfied, hiding a first web page navigation corresponding to a parent web site and displaying a second web page navigation corresponding to the child web site in the web page.
In an embodiment, the first condition may include, but is not limited to: the user makes a first operation on the webpage or the webpage is in a first state. For example, the first operation may be that the user clicks a specific key in the web page (the key may be used to switch the display style of the page), or the user touches the touch screen of the user equipment according to a specific gesture, and the like. The first state may be that the web page is scrolled to the top of the page.
As shown in fig. 4, assuming that the first condition is set as that the web page 20 is scrolled to the top of the page (i.e., the header), if the user always performs an operation of scrolling the web page 20 upward, when the web page 20 is scrolled to the top (i.e., the header is displayed in the screen), the first condition has been satisfied, and at this time, the first web page navigation 11 and the second web page navigation 13 can be hidden in the web page 20.
In step 105, if it is detected that a second condition is satisfied, the first web page navigation and the second web page navigation are displayed in the web page.
In an embodiment, the second condition may include, but is not limited to: the user makes a second operation on the webpage or the webpage is in a second state. For example, the second operation may be that the user clicks a specific key in the web page (the key may be used to switch the display style of the page), or the user touches the touch screen of the user equipment according to a specific gesture, or the user refreshes the web page, and so on. The second state may be that the web page is not scrolled to the top of the page. Step 105 may switch the web page 20 to the display state shown in fig. 3 upon detecting that the second condition is satisfied.
It can be seen that, through steps 103 and 105, the web page 20 can be switched between the display state shown in fig. 3 and the display state shown in fig. 4, so that the first web page navigation 11 is not displayed in the web page 20 at any moment, and the elements of the web page 20 are more concise. The user may not be disturbed by the information in the first webpage navigation 11 during browsing the webpage, which brings an immersive use experience to the user. On the other hand, when the user needs to use the first web page navigation 11 (e.g., return to the home page 10 of the parent website or access the home page of another child website through the first web page navigation 11), the hidden first web page navigation 11 can also be displayed through convenient user operation.
In an optional embodiment, before step 105, the method may further include:
step 104: and clearing the webpage links irrelevant to the sub-website in the original webpage navigation of the parent website to obtain a first webpage navigation.
As shown in fig. 2, the original web page navigation is for being displayed in the home page 10 of the parent web site. The original web page navigation includes a non-public control area 110 and a public control area 112, because some controls in the non-public control area 110 have no relevance to a specific sub-website, the controls in the non-public control area 110 may not need to be used when a user accesses a web page of a specific sub-website. As shown in FIG. 3, after switching from the parent web site's home page 10 to the child web site's home page 20, the original web page navigation is processed to remove the non-public control area 110 contained therein, while leaving only the public control area 112. Through the step 104, on one hand, the user can know that the child website belongs to a child service under the parent website, and on the other hand, the user can be prevented from being interfered by information in the non-public control area 110 or from mistakenly clicking a control in the public control area 110 to cause poor use experience.
In an alternative embodiment, in step 103, if it is detected that the first condition is satisfied, the first web page navigation for being displayed at the top of the page in the web page may be hidden and the second web page navigation may be kept hovering at a particular location of the screen (e.g., the top area of the screen of the user device). As shown in fig. 4, the second web page navigation 13 may be always suspended and displayed in the top area of the screen during the process of the user scrolling down the web page, and this display manner may fix the position of the second web page navigation, thereby bringing an immersive use experience to the user.
Fig. 5 is a flowchart illustrating another method for displaying a web page according to an exemplary embodiment, which may be applied to a User Equipment (UE). As shown in fig. 5, in an embodiment, a method for displaying a web page includes:
step 201: displaying a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to the child web site; .
Step 201 may refer to the description of step 101 above.
Step 203: hiding the first web page navigation in the web page and maintaining display of the second web page navigation if it is detected that the first condition is satisfied.
The first condition may be determined to be satisfied by detecting a user's operation on a web page of a child web site. In this embodiment, the user may select whether to hide the first web page navigation, if so, trigger a specific operation on the web page (for example, a key for a certain user on the web page to switch a display style of the web page) to enable the first condition to be satisfied, and if not, not trigger the specific operation on the web page. Therefore, after the first webpage navigation is hidden, the webpage display style can be more concise.
Corresponding to the method, the webpage display device is also provided, and the webpage display device can comprise various code modules in software.
As shown in fig. 6, in an embodiment, a web page display apparatus 300 may include a web page display unit 310, a first execution unit 320, and a second execution unit 330, wherein:
the web page display unit 310 may be configured to display web pages of a sub-website;
the first execution unit 320 may be configured to hide a first web page navigation corresponding to a parent web site and display a second web page navigation corresponding to the child web site in the web page when detecting that a first condition is satisfied;
the second performing unit 330 may be configured to display the first web page navigation and the second web page navigation in the web page when it is detected that a second condition is satisfied.
In an embodiment, the first condition may include, but is not limited to: the user makes a first operation on the webpage or the webpage is in a first state; the second condition may include, but is not limited to: the user makes a second operation on the webpage or the webpage is in a second state. For example, the first state is that the web page is scrolled to the top of the page, and the second state is that the web page is not scrolled to the top of the page.
In an embodiment, the apparatus 300 may further include a web page navigation processing unit, which clears the web page link irrelevant to the sub-website in the original web page navigation of the parent website to obtain a first web page navigation, wherein the original web page navigation is used for being displayed in the web page of the parent website.
In one embodiment, the first execution unit 320 may hide a first web page navigation corresponding to a parent web site for being displayed at the top of a page in the web page and keep a second web page navigation corresponding to the child web site hovering at a specific position on a screen.
As shown in fig. 7, in a further embodiment, a web page display apparatus 400 includes a web page display unit 410 and a web page navigation hiding unit 420, wherein:
the web page display unit 410 may display a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to a child web site;
the web page navigation hiding unit 420 may hide the first web page navigation in the web page and maintain the display of the second web page navigation when detecting that the first condition is satisfied.
As shown in fig. 8, one or more embodiments of the present disclosure provide an electronic device (e.g., a user equipment UE) that may include a processor, an internal bus, a network interface, a memory (including a memory and a non-volatile memory), and possibly hardware required for other services. A processor may be one or more instances of a Central Processing Unit (CPU), processing unit, processing circuit, processor, Application Specific Integrated Circuit (ASIC), microprocessor, or other processing logic that may execute instructions. The processor reads the corresponding program from the nonvolatile memory into the memory and then runs the program. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
In one embodiment, the processor may be configured to:
displaying the web pages of the sub-websites;
hiding a first web page navigation corresponding to a parent web site and displaying a second web page navigation corresponding to the child web site in the web page if it is detected that a first condition is satisfied;
displaying the first web page navigation and the second web page navigation in the web page if it is detected that a second condition is satisfied.
In another embodiment, the processor may be configured to:
displaying a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to the child web site;
hiding the first web page navigation in the web page and maintaining display of the second web page navigation if it is detected that the first condition is satisfied.
In one embodiment, there is also provided a computer storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
displaying the web pages of the sub-websites;
hiding a first web page navigation corresponding to a parent web site and displaying a second web page navigation corresponding to the child web site in the web page if it is detected that a first condition is satisfied;
displaying the first web page navigation and the second web page navigation in the web page if it is detected that a second condition is satisfied.
In one embodiment, there is also provided a computer storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
displaying a web page of a child web site including a first web page navigation corresponding to a parent web site and a second web page navigation corresponding to the child web site;
hiding the first web page navigation in the web page and maintaining display of the second web page navigation if it is detected that the first condition is satisfied.
The embodiments in the present specification are described in a progressive manner, and the same/similar parts in the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, the apparatus embodiment and the storage medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of claims of one or more embodiments of the present specification.