Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a first method for controlling a terminal having a touch screen according to an embodiment of the present invention. As shown in fig. 1, the method includes:
s101, when the webpage is displayed on the touch screen, the resource file of the webpage is obtained.
The user starts a browser by using the terminal with the touch screen, inputs a website or clicks a hyperlink label of a certain website so that the browser can display a webpage, and the browser downloads a resource file of the webpage to the terminal according to a standard process.
The resource files of the web page include but are not limited to: the edit format is a web page edit file such as HTML (hypertext markup language), JS (JavaScript, script language), CSS (Cascading Style Sheets), or the like.
S102, when the resource file is determined to include the information for identifying the mouse hovering event, starting a preset mode.
The terminal has downloaded the resource file of the web page in S101, and defines a specific event in the resource file using some keywords, for example, in an edit file in an HTML format, an on Mouse over is used as information for identifying a Mouse hovering event, that is, the terminal may determine that the current web page needs to trigger the Mouse hovering event according to the on Mouse over, and the terminal may start a preset mode for detecting an operation for triggering the Mouse hovering event.
And S103, detecting the operation sensed by the touch screen.
S104, when the detected operation meets the trigger condition of a certain mouse hovering event, the certain mouse hovering event is triggered.
In this embodiment, when detecting that the operation on the hovering element satisfies the trigger condition of a certain mouse hovering event, the terminal triggers the certain mouse hovering event. The hovering element can be a certain option tag containing a pull-down menu, or a certain character or letter, or can be a picture; the mouse-over event specifies a specific display effect of the mouse-over event after detecting the user operation information, such as a drop-down menu for popping up an option tab.
Examples are as follows: when editing the resource file, the mouse hovering information on mouse over can be associated with the hovering element and the specific event information; for example, when a user browses a certain portal site, a displayed webpage contains a mark picture of the portal site, the mark picture is an option tag in the webpage, the option tag is represented by a character a in an edit file of the webpage, and the display effect of Mouse hover information on Mouse over and event information display 'welome' is associated with the character a; then when the terminal detects that the user touches the option tab represented by the character a on the touch screen with a finger, a mouse-over event is triggered and displayed according to the associated display effect, i.e., "welome" is displayed on the touch screen.
In the method for controlling the terminal with the touch screen according to the embodiment, the mouse hovering effect of the webpage displayed on the terminal with the touch screen can be achieved by detecting the mouse hovering event corresponding to the operation trigger of the user, the webpage display mode is various and flexible, and the terminal with the touch screen can display the webpage content completely as a Personal Computer (PC) terminal, so that the user experience is enhanced.
How to trigger the mouse hovering event corresponding to the user operation information will be specifically described in the following with several embodiments; the following control modes are only examples and are not intended to limit the present invention.
Fig. 2 is a flowchart illustrating a second method for controlling a terminal having a touch screen according to an embodiment of the present invention. The preset mode in this embodiment is a virtual button assistance mode, and as shown in fig. 2, the method includes:
s201, starting a browser and opening a webpage.
S202, acquiring a resource file of a webpage displayed on the touch screen.
Specifically, S101 in the first embodiment of the present invention is not described herein again.
S203, determining whether the resource file comprises mouse hovering information used for identifying a mouse hovering event; if yes, executing S204, and if not, executing the display mode in S208.
Specifically, as for S102, taking an HTML format as an example, when the resource file includes an on Mouse over that is Mouse hovering information identifying a Mouse hovering event, the terminal queries the resource file, and indicates that a Mouse hovering effect is designed in the web page, and then continues to execute S204.
And S204, displaying prompt information whether to start a preset mode.
For example, when the resource file is queried to include the on Mouse over, the terminal having the touch screen may display a prompt message on the touch screen, where the prompt message is, for example, "do the page contain a Mouse hovering effect and start the intelligent mode.
In addition, operation information for triggering the mouse hovering event can be displayed at the same time, and the operation information is used for informing a user how to perform operation so as to trigger the mouse hovering event; for example, the operation information is "after the mode is started, a mouse hovering event can be simulated by performing a touch operation while pressing a virtual button"; the terminal may simultaneously display the prompt information and the operation information on the touch screen, specifically, "do the page include a mouse hovering effect, and start the intelligent mode.
A user selects to start an intelligent mode, and operates according to displayed operation information to trigger the mouse hovering event, for example, when a finger of the user can press a virtual button, another finger touches a hovering element associated with the mouse hovering event on a page, the hovering element may be a certain option label, a character, a letter or a picture containing a pull-down menu, and if the mouse hovering event is to pop up the pull-down menu explaining the option label, the pull-down menu for explanation is popped up on the page; the mouse-over event may also be the display of a particular mouse-over effect, such as the display of "welome".
The prompt information stays on the touch screen for a period of time, a threshold value can be preset for the specific stay time, and the user selects to start or not start the intelligent mode within the time not exceeding the threshold value; after the time threshold is exceeded, the user does not have any operation, the prompt message disappears, and the webpage is displayed in the step S208; after the prompt information disappears, when the user needs to start the intelligent mode, the user can select to start the intelligent mode in a certain option, for example, select to start the intelligent mode in a setting option of browser software installed on the terminal.
S205, judging whether the user starts the preset mode.
When the prompt message in S204 appears, the user selects the start option, that is, the terminal detects a confirmation operation to start the preset mode, which indicates that the user selects to start the preset mode, that is, the above-mentioned intelligent mode, that is, the above-mentioned virtual button auxiliary mode. The terminal will continue to execute the subsequent steps, and according to the mode set by the virtual button auxiliary mode, the mouse hovering event is triggered according to the user operation; if the user selects the no-launch option, the web page is displayed in the manner described in S208.
If the user touches the "yes" option in the prompt message with a finger, it indicates that the user selects the intelligent mode; the selection operation of the user is detected by a terminal with a touch screen, which is equivalent to that the terminal detects a confirmation message for indicating that the user confirms to start the preset mode; if the user selects the "no" option, it indicates that the user selects not to start the preset mode on the current web page, the selection operation of the user is detected by the terminal with the touch screen, and the terminal displays the web page on the touch screen in the manner described in S208.
S206, displaying the virtual button.
The virtual button displays a virtual button at a default coordinate preset by the terminal;
optionally, in order to improve the user experience, the user may also move the virtual button freely; for example, a user may press a virtual button displayed on the touch screen and drag the virtual button until the virtual button is dragged to a desired display position; in this process, the operation of pressing the virtual button by the user to drag may be detected by the terminal, for example, a temperature sensor or a pressure sensor is disposed on the terminal, when the finger presses the virtual button and drags, the temperature or the pressure of the dragging area on the touch screen changes, and the temperature sensor or the pressure sensor senses the change.
S207, when detecting that the hovering element corresponding to a certain mouse hovering event is contacted and the virtual button displayed on the touch screen is contacted, triggering the certain mouse hovering event.
Specifically, when the terminal with the touch screen detects that a user finger presses a virtual button and the finger does not leave the touch screen, and a hovering element corresponding to a certain mouse hovering event is contacted, the certain mouse hovering event is triggered.
In the embodiment, the position of the virtual button is movable, the user can complete operation according to the use habit, the use of the user is facilitated, meanwhile, the webpage browsing effect of the terminal is more humanized, and the user experience is enhanced.
When the terminal detects that a hovering element corresponding to a certain mouse hovering event is contacted and a virtual button displayed on the touch screen is contacted, triggering the certain mouse hovering event, which is specifically exemplified as follows: and the user touches the virtual button and simultaneously touches the characters, letters or pictures corresponding to a certain mouse hovering event. At this point, some mouse-over event is triggered, e.g., a pop-up drop-down menu on the page, or the appearance of "Welcome".
It should be noted that, after the user touches the virtual button with the finger, in order to enable the terminal to accurately detect the user operation, the terminal shields the multi-touch function. For example, after a user finger touches a virtual button, another finger needs to touch a touch screen in an area other than the virtual button according to user operation information, at this time, the terminal may acquire that two places on the touch screen are touched, and if the multi-point touch function is not shielded, the terminal may analyze the user operation information into a multi-point touch mode, and display a web page according to the multi-point touch mode, such as enlarging, reducing, or minimizing the web page, without triggering a mouse hovering event, which causes inconvenience to the user.
It should be noted that, the terminal may also obtain a touch coverage area corresponding to the user operation; the touch coverage area is, for example, a display area touched by a finger when a user touches the touch screen, and the content displayed in the display area is necessarily shielded by the finger; therefore, the content corresponding to the mouse hovering event, such as 'welome', is displayed in the touch screen area outside the touch coverage area, so that the situation that the displayed event content is shielded by the fingers of the user is avoided, and meanwhile, the multi-point touch function is shielded, so that the mouse hovering event can be accurately triggered after the terminal detects the user operation information, and the user experience is improved.
In addition, after the terminal displays the content of a certain mouse hovering event on the touch screen, if the terminal detects any operation, the terminal stops displaying the content corresponding to the certain mouse hovering event, or, if the terminal does not detect user operation information, the content of the mouse hovering event on the touch screen keeps a display state. Specifically, after the mouse hovering effect appears, the user finger leaves the touch screen until the user finger touches the touch screen again, and the effect does not disappear. For example, after a finger touches a certain option label, the terminal triggers a mouse hovering event to pop up a pull-down menu of the option label, and at this time, the terminal detects that the finger of the user leaves the virtual button and the area where the option label is located, and the pull-down menu does not disappear. When the terminal detects that the finger of the user touches the virtual button again and touches another option tag, namely user operation is executed again, the pull-down menu disappears and a mouse hovering event corresponding to the currently touched option tag is executed; or the terminal detects that the finger of the user does not touch the virtual button, only touches the option label on the webpage, and the pull-down menu disappears and enters the webpage linked with the currently touched option label.
After the mouse hovering effect appears, the fingers of the user leave the touch screen, the effect cannot disappear, and the mouse hovering effect is convenient for the user to check; for example, a pull-down menu popped up by a certain option tab contains more content, a user needs to take a certain time to browse the content of the pull-down menu, and at this time, the finger of the user can leave the touch screen, so that the state of executing the user operation is not required to be kept, the user can conveniently view information, and the user experience is better. When the terminal detects user operation information and triggers a mouse hovering event, the terminal can be triggered to vibrate, specifically, a vibration module of the terminal where the touch screen is located is called to vibrate, and feedback response is given to a user; for example, when a finger of a user touches a virtual button and executes operation information, that is, touches or slides in an area where an option tag is located, at this time, a animation module arranged on a terminal where a touch screen is located is called to generate vibration, and through vibration feedback response, the user can acquire that a mouse hovering event is successfully triggered.
Preferably, the terminal can obtain a hovering element corresponding to the user operation and hovering time information on the hovering element; the hovering element may be a certain word, letter or picture. And when the hovering time information exceeds a preset time threshold, acquiring display content corresponding to the hovering element, and displaying the display content in a display window. For example, a user performs an operation, touches and keeps a touch state in an area where a certain information element displayed on a webpage is located, and does not leave a touch screen, that is, keeps a hovering state, at this time, the terminal obtains a hovering element where a user finger keeps the hovering state, where the hovering element may be an option tag or a segment with hyperlink information, when the time for which the user finger keeps the hovering state exceeds a preset time threshold in the terminal, the terminal displays webpage information content linked with the hovering element in a form of a sub-window in a current page, and the user can quickly browse specific content contained in the hovering element without clicking the hovering element to enter a new webpage; the hovering element can also be only a word or a sentence without webpage link information, when the hovering time of a finger of a user on the word or the sentence exceeds a threshold value, the terminal can call a search engine on the background to search the hovering element and display the searched related information of the hovering element on the sub-window, so that the user can acquire the related information more conveniently, the webpage display effect is more flexible and vivid, and better experience is provided for the user.
S208, the webpage does not display the mouse hovering effect.
In S208, the web page does not display the mouse hovering effect, and even if the user' S finger hovers over a certain option tab, the mouse hovering event is not triggered; at this time, after the user finger touches the option tag, the web page directly enters a new web page linked with the option tag, and the user can acquire content information in the new web page.
It should be noted that: s201, S204, S205, and S206 are optional steps.
In this embodiment, the terminal can trigger a mouse hovering event on the touch screen by detecting the operation of the user, so that the problem that the mouse hovering effect cannot be displayed when a webpage is browsed on the terminal with the touch screen is solved; the webpage display is flexible and vivid, the user experience is enhanced, meanwhile, the touch coverage area can be obtained, the event content is displayed in the touch screen area outside the area, the situation that the user fingers shield the displayed event content is avoided, meanwhile, the vibration feedback response is given, and the display effect is more intelligent and humanized.
Fig. 3 is a flowchart illustrating a third method for controlling a terminal having a touch screen according to an embodiment of the present invention. The preset mode in this embodiment is a physical key auxiliary mode, where the physical key is a volume key, for example, as shown in fig. 3, the method includes:
s301, starting a browser and opening a webpage.
S302, acquiring a resource file of a webpage displayed on the touch screen.
Specifically, S101 in the first embodiment of the present invention is not described herein again.
S303, determining whether the resource file comprises mouse hovering information for identifying a mouse hovering event; if yes, executing S304, and if not, executing the display mode in S307.
Specifically, as for S102, taking HTML format as an example, when the resource file includes an on Mouse over that is Mouse hovering information identifying a Mouse hovering event, the terminal queries the resource file, and if the on Mouse over is the Mouse hovering information identifying the Mouse hovering event, it indicates that a Mouse hovering effect is designed in the web page, and then S304 is continuously executed.
S304, displaying prompt information whether to start the preset mode.
For example, when the resource file is queried to include the on Mouse over, the terminal having the touch screen may display a prompt message on the touch screen, where the prompt message is, for example, "do the page contain a Mouse hovering effect and start the intelligent mode.
In addition, operation information for triggering the mouse hovering event can be displayed at the same time, and the operation information is used for informing a user how to perform operation so as to trigger the mouse hovering event; for example, the operation information is "after the mode is started, a mouse hovering event can be simulated by performing a touch operation while pressing a volume key"; the terminal can simultaneously display the prompt information and the operation information on the touch screen, specifically, "do the page include a mouse hovering effect, and start the intelligent mode.
The user selects to start the intelligent mode, and operates according to the displayed operation information to trigger the mouse hovering event, for example, when the finger of the user can press a volume key, another finger touches a hovering element associated with the mouse hovering event on the page, and the hovering element can be an option tag, a character, a letter or a picture containing a pull-down menu; if the mouse-over event is a pop-up of a drop-down menu illustrating the option tab, the drop-down menu is popped up on the web page or a specific mouse-over effect is displayed, such as displaying "welome".
The prompt information stays on the touch screen for a period of time, a threshold value can be preset for the specific stay time, and the user selects to start or not start the intelligent mode within the time not exceeding the threshold value; after the time threshold is exceeded, the user does not have any operation, and the prompt message disappears; the web page is displayed as per S307; after the prompt message disappears, the user needs to start the intelligent mode, and may select to start the intelligent mode in a certain option, for example, select to start the intelligent mode in a setting option of browser software installed on the terminal.
S305, judging whether the user starts a preset mode or not.
When the prompt message in S304 appears, the user selects the start option, that is, the terminal detects a confirmation operation to start the preset mode, which indicates that the user selects to start the preset mode, that is, the above-mentioned intelligent mode, that is, the above-mentioned physical key assistance mode. The terminal will continue to execute the subsequent steps, and according to the mode set by the virtual button auxiliary mode, the mouse hovering event is triggered according to the user operation information; if the user selects the no-start option, the web page is displayed in the manner described in S307.
If the user touches the "yes" option in the prompt message with a finger, it indicates that the user selects the intelligent mode; the selection operation of the user is detected by a terminal with a touch screen, which is equivalent to that the terminal detects a confirmation message for indicating that the user confirms to start the preset mode; if the user selects the "no" option, it indicates that the user selects not to start the preset mode on the current web page, the selection operation of the user is detected by the terminal having the touch screen, and the terminal displays the web page on the touch screen in the manner described in S307.
S306, when detecting that the hovering element corresponding to a certain mouse hovering event is contacted and a preset certain key is pressed, triggering the certain mouse hovering event.
A preset certain key is a physical key, in this embodiment, the physical key is a volume key, for example, a user presses the volume key, and simultaneously the user touches the touch screen, for example, touches an option tag on a web page, or slides at the option tag, then the user presses the volume key and simultaneously touches or slides at the option tag, at this time, the terminal executes a corresponding mouse hover event according to the operation, for example, when the terminal triggers a certain mouse hover event corresponding to the option tag, the mouse hover event is displayed according to a mouse hover event effect associated with the option tag, for example, a pull-down menu is popped up, or a "Welcome" appears.
It should be noted that, the terminal may further obtain a touch coverage area corresponding to the user touch option tag; in the touch screen area outside the touch coverage area, the content corresponding to the mouse hovering event is displayed, for example, "welome" is displayed, so that the user finger is prevented from blocking the displayed event content, and the user experience is increased.
In addition, after the content corresponding to a certain mouse hovering event is displayed, if the terminal detects any operation, the touch screen of the terminal stops displaying the content corresponding to the certain mouse hovering event, or after the mouse hovering effect appears, the terminal detects that the user finger leaves the touch screen until the user finger touches the touch screen again, and the effect does not disappear. For example, after a finger touches a certain option tag, a mouse hovering event is triggered, a pull-down menu of the option tag is popped up, and at this time, the terminal detects that the finger of the user leaves a physical key and an area where the option tag is located, and the pull-down menu does not disappear. When the terminal detects that the user finger presses the physical key again and touches another option tag, namely user operation is executed again, the pull-down menu disappears and a mouse hovering event corresponding to the currently touched option tag is executed; or when the terminal detects that the user does not press the physical key by the finger, only the option label on the webpage is touched, and the pull-down menu disappears and enters the webpage linked with the currently touched option label.
After the mouse hovering effect appears, the fingers of the user leave the touch screen, the effect cannot disappear, and the mouse hovering effect is convenient for the user to check; for example, a pull-down menu popped up by a certain option tab contains more content, a user needs to take a certain time to browse the content of the pull-down menu, and at this time, the finger of the user can leave the touch screen, so that the state of executing the user operation is not required to be kept, the user can conveniently view information, and the user experience is better.
When the terminal detects user operation information and triggers a mouse hovering event, namely a certain mouse hovering event is triggered, the terminal is triggered to vibrate, namely a vibration module of the terminal where the touch screen is located is called to vibrate, and feedback response is given to a user; for example, when a user finger executes operation information while pressing a physical key, that is, touches or slides in an area where an option tag is located, at this time, a navigation module arranged on a terminal where a touch screen is located is called to generate vibration, and through vibration feedback response, the user can acquire that a mouse hovering event is successfully triggered.
Preferably, the terminal can obtain a hovering element corresponding to the user operation information and hovering time information on the hovering element; wherein the hovering element can be a certain word, letter or picture. And when the hovering time information exceeds a preset time threshold, acquiring display content corresponding to the hovering element, and displaying the display content in a display window. For example, a user performs a user operation, touches and keeps a touch state in an area where a certain information element displayed on a webpage is located without leaving a touch screen, that is, keeps a hovering state, at this time, a terminal obtains a hovering element that a user finger keeps the hovering state, the hovering element may be an option tag or a segment with hyperlink information, when the time that the user finger keeps the hovering state exceeds a preset time threshold of the terminal, the terminal displays webpage information content linked with the hovering element in a form of a sub-window in a current page, and the user can quickly browse specific content contained in the hovering element without clicking the hovering element to enter a new webpage; the hovering element can also be only a word or a sentence without webpage link information, when the hovering time of a finger of a user on the word or the sentence exceeds a threshold value, the terminal can call a search engine on the background to search the hovering element and display the searched related information of the hovering element on the sub-window, so that the user can acquire the related information more conveniently, the webpage display effect is more flexible and vivid, and better experience is provided for the user.
S307, the webpage does not display the mouse hovering effect.
In S307, the web page does not display the mouse hovering effect, and even if the user' S finger hovers over a certain option tab, the mouse hovering event is not triggered; at this time, after the user finger touches the option tag, the web page directly enters a new web page linked with the option tag, and the user can acquire content information in the new web page.
It should be noted that: s301, S304, and S305 are optional steps.
In this embodiment, the terminal can trigger a mouse hovering event on the touch screen by detecting the operation of the user, so that the problem that the mouse hovering effect cannot be displayed when a webpage is browsed on the terminal with the touch screen is solved; the webpage display is flexible and vivid, the user experience is enhanced, meanwhile, the touch coverage area can be obtained, the event content is displayed in the touch screen area outside the area, the situation that the user fingers shield the displayed event content is avoided, meanwhile, the vibration feedback response is given, and the display effect is more intelligent and humanized.
Fig. 4 is a flowchart illustrating a fourth method for controlling a terminal having a touch screen according to the present invention. In this embodiment, the preset mode is a suspension recognition mode, as shown in fig. 4, the method includes:
s401, starting a browser and opening a webpage.
S402, acquiring a resource file of a webpage displayed on the touch screen.
Specifically, S101 in the first embodiment of the present invention is not described herein again.
S403, determining whether the resource file comprises mouse hovering information for identifying a mouse hovering event; if yes, go to step S404, and if not, go to step S408.
Specifically, as for S102, taking an HTML format as an example, when the resource file includes an on Mouse over that is Mouse hovering information identifying a Mouse hovering event, the terminal queries the resource file, and indicates that a Mouse hovering effect is designed in the web page, and then continues to execute S404.
S404, displaying prompt information whether to start the preset mode.
For example, when the resource file is queried to include an on Mouse over, the terminal having the touch screen may display a prompt message on the touch screen, where the prompt message is, for example, a page containing a Mouse hovering effect and whether to start an intelligent mode.
In addition, operation information for triggering the mouse hovering event can be displayed at the same time, and the operation information is used for informing a user how to perform operation so as to trigger the mouse hovering event; for example, the operation information is "after the mode is started, a finger is suspended above the touch screen to simulate a mouse hovering event"; the terminal can simultaneously display the prompt information and the operation information on the touch screen, specifically, "do the page include a mouse hovering effect, and start the intelligent mode.
The user selects to start the intelligent mode, and operates according to the displayed operation information to trigger the mouse hovering event, for example, a finger of the user can be selected in a suspended manner above the touch screen, it needs to be stated that an area where the finger is projected onto the touch screen at the suspended position needs to be matched with an area where an option tag on a current webpage is located, and the distance between the finger and the touch screen is within a threshold value detectable by the terminal, so that the mouse hovering event can be triggered to display a mouse hovering effect; if the mouse hovering event is a pull-down menu for explaining the option label, a pull-down menu for explaining is popped up on the webpage; alternatively, a particular mouse-over effect may be indicated to be displayed according to the event processing flow, such as displaying "welome".
The prompt information stays on the touch screen for a period of time, a threshold value can be preset for the specific stay time, and the user selects to start or not start the intelligent mode within the time not exceeding the threshold value; after the time threshold is exceeded, the user does not have any operation, and the inquiry information disappears; simultaneously, the webpage is displayed according to S407; after the query message disappears, when the user needs to start the intelligent mode, the user may select to start the intelligent mode in a certain option, for example, select to start the intelligent mode in a setting option of browser software installed on the terminal.
S405, judging whether the user starts a preset mode or not.
When the prompt message in S404 appears, the user selects the start option, the terminal detects a confirmation operation to start the preset mode, that is, the user selects the start of the preset mode, that is, the intelligent mode, the terminal will continue to perform the subsequent steps, and a mouse hovering event is triggered and a corresponding event is executed according to the user operation information; if the user selects the no-start option, the web page is displayed in the manner described in S407.
If the user touches the "yes" option in the prompt message with a finger, it indicates that the user selects the intelligent mode; the selection operation of the user is detected by a terminal with a touch screen, which is equivalent to that the terminal detects a confirmation message for indicating that the user confirms to start the preset mode; if the user selects the "no" option, it indicates that the user selects not to start the preset mode on the current web page, the selection operation of the user is detected by the terminal with the touch screen, and the terminal displays the web page on the touch screen in the manner described in S407.
S406, when detecting that a hovering element corresponding to a certain mouse hovering event is selected in a non-contact mode, triggering the certain mouse hovering event;
specifically, the non-contact mode can be selected by means of one or several sensors and corresponding supporting circuits, and the related sensors include but are not limited to: the terminal detects that the finger of a user is suspended above the touch screen, and acquires the suspended position information of the finger of the user above the touch screen.
The terminal acquires the suspension position information of the finger of the user above the touch screen, the suspension position is mapped in the area on the touch screen and is overlapped with the option label area, a mouse hovering event is triggered, and the effect of the mouse hovering event is displayed according to the event indication related to the option label, such as popping up a pull-down menu or appearing 'welome'. In addition, after the terminal displays the content corresponding to a certain mouse hovering event, if the terminal detects any operation, the touch screen of the terminal stops displaying the content corresponding to the certain mouse hovering event, that is, after the mouse hovering effect appears, the terminal detects that the user finger is far away from the touch screen, and the effect does not disappear until the terminal detects that the user finger is again suspended above the touch screen. For example, after the terminal detects that the region where the finger is positioned above the touch screen in a suspended position is mapped on the touch screen and coincides with the region where the option tag is positioned, a mouse hovering event is triggered, and the pull-down menu of the option tag is popped up. When the terminal detects that the user finger is suspended above the touch screen again, the pull-down menu disappears and a mouse hovering event corresponding to the option tag mapped to the current suspended position is executed; or the user finger directly touches the option label on the webpage, and the pull-down menu disappears and enters the webpage linked with the currently touched option label.
After the mouse hovering effect appears, the terminal detects that the user finger leaves the touch screen, the effect cannot disappear, and the mouse hovering effect is convenient for the user to check; for example, a pull-down menu popped up by a certain option tab contains more content, a user needs a certain time to browse the content of the pull-down menu, and at the moment, the finger of the user does not need to be suspended to keep the state of executing the user operation, so that the user can conveniently view information and the user experience is better.
When the terminal detects user operation information and triggers a mouse hovering event, namely when the certain mouse hovering event is triggered, the terminal is triggered to vibrate, namely a vibration module of the terminal where the touch screen is located is called to vibrate, and feedback response is given to a user; for example, the terminal detects that a finger of a user is suspended above the touch screen to trigger a mouse hovering event, at the moment, a viberation module arranged on the terminal where the touch screen is located is called to generate vibration, the user can acquire that the mouse hovering event is successfully executed through vibration feedback response, and if no vibration feedback exists, the user can know that the current suspended position is inaccurate and is not matched with an area where the option tag is located, and the suspended position can be immediately adjusted.
Preferably, the terminal can obtain a hovering element corresponding to the user operation and hovering time information on the hovering element; the hovering element can be a certain character, letter or picture; and when the hovering time information exceeds a preset time threshold, acquiring display content corresponding to the hovering element, and displaying the display content in a display window. For example, a user performs a user operation, a finger above a touch screen in an area where a certain information element displayed on a webpage is located keeps a suspension action, that is, keeps a suspension state, at this time, a terminal obtains a suspension element that the user finger keeps the suspension state, the suspension element may be a certain option tag or a segment with hyperlink information, when the time that the user finger keeps the suspension state exceeds a preset time threshold in a browser system, the terminal displays webpage information content linked with the suspension element in a form of a sub-window in a current page, and the user can quickly browse specific content contained in the suspension element without clicking the suspension element to enter a new webpage; the hovering element can also be only a word or a sentence without webpage link information, when the hovering time of a finger of a user on the word or the sentence exceeds a threshold value, the terminal can call a search engine on the background to search the hovering element and display the searched related information of the hovering element on the sub-window, so that the user can acquire the related information more conveniently, the webpage display effect is more flexible and vivid, and better experience is provided for the user.
S407, the webpage does not display the mouse hovering effect.
In S407, the web page does not display the mouse hovering effect, and even if the user' S finger hovers over a certain option tab, the mouse hovering effect is not triggered; at this time, after the user finger touches the option tag, the web page directly enters a new web page linked with the option tag, and the user can acquire content information in the new web page.
It should be noted that: s401, S404, and S405 are optional steps.
In the embodiment, the terminal can acquire the operation information of the suspended finger of the user, and the mouse hovering event is triggered on the touch screen, so that the problem that the mouse hovering effect cannot be displayed when a webpage is browsed on the terminal with the touch screen is solved; the webpage display is flexible and vivid, the user experience is enhanced, meanwhile, the touch coverage area can be obtained, the event content is displayed in the touch screen area outside the area, the situation that the user fingers shield the displayed event content is avoided, meanwhile, the vibration feedback response is given, and the display effect is more intelligent and humanized.
It should be further noted that, in each of the above method embodiments, the terminal as an execution subject may separately complete each step in the method embodiment; alternatively, the steps in the method embodiment may be performed by the terminal and a browser program installed on the terminal together.
Fig. 5 is a schematic structural diagram of a terminal according to a first embodiment of the present invention. As shown in fig. 5, the terminal has a touch screen, including:
the acquiring module 501 is configured to acquire a resource file of a web page when the web page is displayed on a touch screen;
a starting module 502, configured to start a preset mode when it is determined that the resource file includes information for identifying a mouse hover event;
the detection module 503 is configured to detect an operation sensed by the touch screen;
a triggering module 504, configured to trigger a certain mouse-over event when the operation detected by the detecting module 503 meets a triggering condition of the certain mouse-over event.
The terminal as described above further includes a display module 505, configured to display, before the preset mode is started, a prompt message indicating whether to start the preset mode and (optionally) an operation message for starting the preset mode; correspondingly, the detecting module 503 is further configured to detect that the confirmation operation of the preset mode is started. The operation information is used for enabling a user to operate according to the operation information to trigger the mouse hovering event.
It should be noted that the display module 505 may be implemented by hardware and/or software, where the hardware may be a touch screen on the terminal, and the software may be a display control program stored in the terminal. .
The triggering module 504 is specifically configured to trigger a certain mouse-over event when the detecting module 503 detects that a hovering element corresponding to the certain mouse-over event is touched and a virtual button displayed on the touch screen is touched.
Optionally, the triggering module 504 is further specifically configured to trigger a certain mouse hovering event when the detecting module 503 detects that a hovering element corresponding to the certain mouse hovering event is touched and a preset certain key is pressed.
Optionally, the triggering module 504 is specifically configured to trigger a certain mouse-over event when the detecting module 503 detects that a hovering element corresponding to the certain mouse-over event is selected in a non-contact manner.
Optionally, the display module 505 is further configured to drive the touch screen to stop displaying the content corresponding to the certain mouse hovering event when the detection module 503 detects any operation after displaying the content corresponding to the certain mouse hovering event.
The triggering module 504 is further configured to trigger the terminal to vibrate while triggering a certain mouse-over event.
In the terminal embodiment of the present invention, each module corresponds to each method embodiment described above, and details are not described here.
The terminal provided by the embodiment solves the problem that the mouse hovering effect cannot be displayed when a webpage is browsed on the terminal with the touch screen; the webpage display is flexible and vivid, the user experience is enhanced, meanwhile, the touch coverage area can be obtained, the event content is displayed in the touch screen area outside the area, the situation that the user fingers shield the displayed event content is avoided, meanwhile, the vibration feedback response is given, and the display effect is more intelligent and humanized.
Fig. 6 is a schematic structural diagram of a second terminal embodiment of the present invention. As shown in fig. 6, the terminal includes:
a touch screen 601;
at least one processor 602, the at least one processor 602 being coupled to the touch screen 601, the at least one processor 602 being configured to obtain a resource file of a web page when the web page is displayed on the touch screen 601; starting a preset mode when the resource file is determined to comprise information for identifying the mouse hovering event; detecting an operation sensed by the touch screen 601; and triggering a certain mouse hovering event when the detected operation meets the triggering condition of the certain mouse hovering event.
Optionally, the at least one processor 602 is further configured to detect a confirmation operation of starting the preset mode when the prompt message indicating whether the preset mode is started is displayed on the touch screen 601.
Optionally, when the detected operation satisfies a trigger condition of a certain mouse hover event, triggering the certain mouse hover event includes:
when detecting that the hovering element corresponding to the certain mouse hovering event is contacted and a virtual button displayed on the touch screen is contacted, triggering the certain mouse hovering event; or,
when detecting that a hovering element corresponding to the certain mouse hovering event is contacted and a preset certain key is pressed, triggering the certain mouse hovering event; or,
and triggering the certain mouse hovering event when detecting that the hovering element corresponding to the certain mouse hovering event is selected in a non-contact mode.
The triggering of the certain mouse hover event includes:
and after the content corresponding to the certain mouse hovering event is displayed, if any operation is detected, stopping displaying the content corresponding to the certain mouse hovering event.
Optionally, the at least one processor 602 is further configured to trigger the terminal to vibrate at the same time as the triggering of the certain mouse-over event.
In the terminal embodiment of the present invention, the touch screen 601 and the at least one processor 602 correspond to the above-mentioned method embodiments, and are not described herein again.
The terminal provided by the embodiment solves the problem that the mouse hovering effect cannot be displayed when a webpage is browsed on the terminal with the touch screen; the webpage display is flexible and vivid, the user experience is enhanced, meanwhile, the touch coverage area can be obtained, the event content is displayed in the touch screen area outside the area, the situation that the user fingers shield the displayed event content is avoided, meanwhile, the vibration feedback response is given, and the display effect is more intelligent and humanized.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments can be implemented by hardware related to the flow instructions. The aforementioned process can be stored in a computer readable storage medium. When executed, the flow performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media capable of storing the flow code, such as ROM, RAM, magnetic or optical disk.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.