CN111414164B - Shortcut key setting method and device and shortcut key processing method and device in page - Google Patents

Shortcut key setting method and device and shortcut key processing method and device in page Download PDF

Info

Publication number
CN111414164B
CN111414164B CN201910009384.6A CN201910009384A CN111414164B CN 111414164 B CN111414164 B CN 111414164B CN 201910009384 A CN201910009384 A CN 201910009384A CN 111414164 B CN111414164 B CN 111414164B
Authority
CN
China
Prior art keywords
shortcut key
setting
webpage
web page
form elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910009384.6A
Other languages
Chinese (zh)
Other versions
CN111414164A (en
Inventor
万先甲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910009384.6A priority Critical patent/CN111414164B/en
Publication of CN111414164A publication Critical patent/CN111414164A/en
Application granted granted Critical
Publication of CN111414164B publication Critical patent/CN111414164B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Abstract

The invention discloses a shortcut key setting method, a shortcut key processing method in a page and a device. Wherein the method comprises the following steps: changing the attribute of the webpage element according to the obtained shortcut key identification; and setting a trigger event and a processing function of the shortcut key identification according to the webpage element attribute. The invention solves the technical problem of difficult maintenance caused by fixed setting in the process of setting the shortcut key in the prior art.

Description

Shortcut key setting method and device and shortcut key processing method and device in page
Technical Field
The invention relates to the technical field of Internet, in particular to a shortcut key setting method, a shortcut key processing method in a page and a shortcut key processing device.
Background
In traditional software (such as word, excel, etc.), shortcut keys are often used to improve the use efficiency of the software by users; with the development of internet products, web pages and SaaS system pages are more and more complex, such as a large number of forms needing to be input, for the complex forms similar to the types, a browser defaults to support a user to switch an input box by using a mouse and a tab key of a keyboard, but the two modes can not be quickly reached when being quickly switched from one input box to another target input box.
At present, most of shortcut keys are realized by writing in JS codes, such as: document. Queryselector ('input [ name=search ]'). Addeventlist ('key up',
function () { }; disadvantages: this approach must use a name or other unique designation in the input box to establish a mapping relationship that is easily changed during the development of the product, and is therefore not easy to maintain.
In other related technologies, the mapping relation is established by analyzing the mapping file, and the mapping relation is easy to change along with the change of the variable in the development process of the product, so that the method is not easy to maintain.
Aiming at the problem that the prior art is difficult to maintain due to the fixed setting in the process of setting the shortcut key, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method for setting a shortcut key, a method and a device for processing the shortcut key in a page, which at least solve the technical problem that maintenance is difficult due to fixed setting in the process of setting the shortcut key in the prior art.
According to an aspect of the embodiment of the present invention, there is provided a method for setting a shortcut key, including: changing the attribute of the webpage element according to the obtained shortcut key identification; and setting a trigger event and a processing function of the shortcut key identification according to the webpage element attribute.
Optionally, changing the attribute of the webpage element according to the obtained shortcut key identifier includes: acquiring the web page element attributes of all form elements in a web page; obtaining shortcut key identifiers of all form elements; writing the shortcut key identification into the web page element attribute to obtain the changed web page element attribute.
Optionally, before acquiring the web page element attributes of all the form elements in the web page, the method further includes: acquiring a triggered webpage; and loading the webpage to obtain the successfully loaded webpage.
Optionally, obtaining all the table elements in the web page includes: traversing all form elements in the webpage through an application programming interface in the browser to obtain all form elements.
Optionally, obtaining the shortcut key identifiers of all form elements includes: and acquiring shortcut key identifiers of all form elements from the attributes of all form elements.
Optionally, the triggering event and the processing function for setting the shortcut key identifier according to the attribute of the webpage element include: and setting trigger events and processing functions of the shortcut key identification through a browser script language according to the webpage element attribute.
According to another aspect of the embodiment of the present invention, there is also provided a shortcut key setting device, including: the changing module is used for changing the attribute of the webpage element according to the acquired shortcut key identification; and the setting module is used for setting trigger events and processing functions of the shortcut key identification according to the webpage element attribute.
Optionally, the modification module includes: the first acquisition unit is used for acquiring the web page element attributes of all the form elements in the web page; the second acquisition unit is used for acquiring shortcut key identifiers of all form elements; and the changing unit is used for writing the shortcut key identification into the web page element attribute to obtain the changed web page element attribute.
Optionally, the apparatus further comprises: the acquisition module is used for acquiring the triggered web page before acquiring all the table element in the web page; and the loading module is used for loading the webpage to obtain the successfully loaded webpage.
Optionally, the first obtaining unit includes: the first obtaining subunit is configured to traverse all form elements in the web page through an application programming interface in the browser to obtain all form elements.
Optionally, the second obtaining unit includes: and the second acquisition subunit is used for acquiring the shortcut key identifiers of all the form elements from the attributes of all the form elements.
Optionally, the setting module includes: the setting unit is used for setting trigger events and processing functions of the shortcut key identification through the browser script language according to the webpage element attribute.
According to one aspect of the embodiment of the invention, there is provided a method for processing a shortcut key in a page, including: loading a page and determining page elements in the page; acquiring a shortcut key identification in the page element; registering the triggering event and the processing function of the shortcut key identification.
According to still another aspect of the embodiments of the present invention, there is further provided a storage medium, where the storage medium includes a stored program, and when the program runs, the device in which the storage medium is controlled to execute the above method for setting a shortcut key or the method for processing a shortcut key in a page.
In the embodiment of the invention, the attribute of the webpage element is changed by adopting a mode of directly writing the identifier of the shortcut key into the attribute of the webpage element according to the acquired identifier of the shortcut key; the trigger event and the processing function of the shortcut key identification are set according to the webpage element attribute, so that the aim of quickly reaching a target input box of a user is fulfilled, the switching cost is greatly reduced, the technical effect of input efficiency is improved, and the technical problem that maintenance is difficult due to the fact that the shortcut key is set through fixed setting in the process of setting in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a method for setting a shortcut key according to an embodiment of the present invention;
fig. 2 is a flowchart of a method of setting a shortcut key according to a first embodiment of the present invention;
FIG. 3 is a flow chart of a method for setting a shortcut key according to a first embodiment of the present invention;
fig. 4 is a schematic structural view of a shortcut key setting device in accordance with the second embodiment of the present invention;
fig. 5 is a flowchart of a method for processing a shortcut key in a page in accordance with the third embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical terms referred to in this application are:
shortcut key: the quick key or the hot key refers to that an operation is completed through certain specific keys, key sequences or key combinations, and many quick keys are often matched with a Ctrl key, a Shift key, an Alt key, an Fn key, a Windows key under a Windows platform, a Meta key on a Mac machine and the like. And (3) a browser: refers to a piece of software that can display the contents of HTML files (an application of standard universal markup language) of a web server or file system and allow a user to interact with these files.
Example 1
According to an embodiment of the present invention, there is also provided an embodiment of a method for setting a shortcut key, it should be noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that herein.
The method embodiment provided in the first embodiment of the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking a computer terminal as an example, fig. 1 is a block diagram of a hardware structure of a computer terminal according to a method for setting a shortcut key in an embodiment of the present invention. As shown in fig. 1, the computer terminal 10 may include one or more (only one is shown in the figure) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the shortcut key setting method in the embodiment of the present invention, and the processor 102 executes the software programs and modules stored in the memory 104, thereby executing various functional applications and data processing, that is, implementing the shortcut key setting method of the application program. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. The specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
In the above-described operating environment, the present application provides a method for setting a shortcut key as shown in fig. 2. Fig. 2 is a flowchart of a method of setting a shortcut key according to a first embodiment of the present invention.
Step S202, changing the attribute of the webpage element according to the obtained shortcut key identification;
in step S202, all form elements in the web page are acquired through an application programming interface (Application Programming Interface, abbreviated as API) of the browser.
In the process of acquiring the shortcut key identification in the embodiment of the application, based on all the acquired form elements, further, the shortcut key identification in all the form elements is acquired.
Step S204, setting trigger events and processing functions of the shortcut key identification according to the webpage element attribute.
In step S204, based on the shortcut key identifier obtained in step S202, a trigger event corresponding to the shortcut key identifier is obtained according to the shortcut key identifier, a processing function triggering the shortcut key identifier is recorded, and finally the processing function and the trigger event are registered. It should be noted that, in the embodiment of the present application, the trigger event of the shortcut key identifier and the processing function of the trigger event are registered by using a browser scripting language, where specific examples are as follows:
writing the identification of the shortcut key directly to the attribute of the form element, such as:
<input shortcuts="ctrl+k"/>
that is, when browsing the web page containing the element, pressing the "ctrl+k" key on the keyboard can activate the event processing function corresponding to the shortcut key, such as: let the element get focus, select the element to be in Chinese, etc.
According to the shortcut key setting method provided by the embodiment of the application, the shortcut key is directly written into the attribute of the form element, and no matter how other attributes change, the shortcut key cannot be invalid; only when deleting the element, the shortcut key will be invalid, so that the problem that the element used for registering the shortcut key in the prior art needs to have a unique identifier, and the change of the unique identifier can cause the shortcut key to be invalid is avoided.
In the embodiment of the invention, the attribute of the webpage element is changed by adopting a mode of directly writing the identifier of the shortcut key into the attribute of the webpage element according to the acquired identifier of the shortcut key; the trigger event and the processing function of the shortcut key identification are set according to the webpage element attribute, so that the aim of quickly reaching a target input box of a user is fulfilled, the switching cost is greatly reduced, the technical effect of input efficiency is improved, and the technical problem that maintenance is difficult due to the fact that the shortcut key is set through fixed setting in the process of setting in the prior art is solved.
Optionally, in step S202, changing the attribute of the web page element according to the obtained shortcut key identifier includes: acquiring the web page element attributes of all form elements in a web page; obtaining shortcut key identifiers of all form elements; writing the shortcut key identification into the web page element attribute to obtain the changed web page element attribute.
Optionally, before acquiring the web page element attributes of all the form elements in the web page in step S202, the method for setting the shortcut key provided in the embodiment of the present application further includes:
step S200, acquiring a triggered webpage;
step S201, loading the webpage to obtain the successfully loaded webpage.
Specifically, in combination with step S200 and step S201, before all the form elements in the web page are acquired, one web page needs to be completely loaded to avoid missing form elements.
Optionally, obtaining all the table elements in the web page includes: traversing all form elements in the webpage through an application programming interface in the browser to obtain all form elements.
Specifically, in step S2021 in the embodiment of the present application, in order to perform step S206 smoothly, all form elements in the web page need to be traversed through the browser API (Application Programming Interface ).
Optionally, obtaining the shortcut key identifiers of all form elements includes: and acquiring shortcut key identifiers of all form elements from the attributes of all form elements.
Optionally, the setting triggering event and processing function of the shortcut key identifier according to the attribute of the web page element in step S204 includes:
step S2041, setting a trigger event and a processing function of the shortcut key identification through a browser script language according to the web page element attribute.
Specifically, in combination with the steps S200 to S204, fig. 3 is a schematic flow chart of a method for setting a shortcut key according to a first embodiment of the present invention, and as shown in fig. 3, the method for setting a shortcut key according to the embodiment of the present invention specifically includes the following steps:
step1, acquiring a webpage which is successfully loaded;
step2, traversing according to the API in the browser for displaying the webpage to obtain all form elements in the webpage;
step3, obtaining a shortcut key identification in the form element;
step4, registering the trigger event corresponding to the shortcut key identification through a browser script language, and processing the processing function when the trigger event is processed.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
From the above description of the embodiments, it will be clear to those skilled in the art that the method for setting a shortcut key according to the above embodiments may be implemented by means of software plus a necessary general hardware platform, and certainly may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
According to an embodiment of the present invention, there is further provided an apparatus for implementing the method for setting a shortcut key, as shown in fig. 4, and fig. 4 is a schematic structural diagram of an apparatus for setting a shortcut key according to a second embodiment of the present invention, where the apparatus includes:
a modification module 42, configured to modify the attribute of the web page element according to the obtained shortcut key identifier; a setting module 44, configured to set the trigger event and the processing function of the shortcut key identifier according to the attribute of the web page element.
In the embodiment of the invention, the attribute of the webpage element is changed by adopting a mode of directly writing the identifier of the shortcut key into the attribute of the webpage element according to the acquired identifier of the shortcut key; the trigger event and the processing function of the shortcut key identification are set according to the webpage element attribute, so that the aim of quickly reaching a target input box of a user is fulfilled, the switching cost is greatly reduced, the technical effect of input efficiency is improved, and the technical problem that maintenance is difficult due to the fact that the shortcut key is set through fixed setting in the process of setting in the prior art is solved.
Optionally, the modification module 42 includes: the first acquisition unit is used for acquiring the web page element attributes of all the form elements in the web page; the second acquisition unit is used for acquiring shortcut key identifiers of all form elements; and the changing unit is used for writing the shortcut key identification into the web page element attribute to obtain the changed web page element attribute.
Optionally, the shortcut key setting device provided in the embodiment of the present application further includes: the acquisition module is used for acquiring the triggered web page before acquiring all the table element in the web page; and the loading module is used for loading the webpage to obtain the successfully loaded webpage.
Optionally, the first obtaining unit includes: the first obtaining subunit is configured to traverse all form elements in the web page through an application programming interface in the browser to obtain all form elements.
Optionally, the second obtaining unit includes: and the second acquisition subunit is used for acquiring the shortcut key identifiers of all the form elements from the attributes of all the form elements.
Optionally, the setting module 42 includes: the setting unit is used for setting trigger events and processing functions of the shortcut key identification through the browser script language according to the webpage element attribute.
Example 3
According to an aspect of an embodiment of the present invention, there is provided a method for processing a shortcut key in a page, and fig. 5 is a flowchart of a method for processing a shortcut key in a page according to a third embodiment of the present invention, as shown in fig. 5, including:
step S502, loading a page and determining page elements in the page;
step S504, obtaining a shortcut key identification in a page element;
in step S506, trigger events and processing functions of the shortcut key identification are registered.
Specifically, in combination with step S502 to step S506, the method for processing the shortcut key in the page provided in the embodiment of the present application may be suitable for setting the shortcut key in the process of using the browser, and since the setting of the existing shortcut key may cause a change in a mapping relationship between the shortcut key and the corresponding function due to a change in a product, the shortcut key is invalid;
by writing the shortcut key identification into the web page element attribute and associating the shortcut key identification with the corresponding trigger event and the processing function, the shortcut key processing method in the page can still be used even if the product changes.
In this embodiment of the present application, a web page is completely loaded to avoid missing form elements, all form elements in the web page are acquired through an application program interface (Application Programming Interface, abbreviated as API) of the browser, based on all the acquired form elements (i.e., page elements in the embodiment of the present application), further, a shortcut key identifier in all the form elements is acquired, a trigger event corresponding to the shortcut key identifier is acquired according to the shortcut key identifier, a processing function triggering the shortcut key identifier is recorded, and finally the processing function and the trigger event are registered;
for example, create a shortcut key to a screenshot: ctrl+Alt+X, acquiring form elements of a screen capturing function in a webpage through an API of a browser, acquiring a shortcut key identifier marked as Ctrl+Alt+X based on the form elements of the screen capturing function, and writing the shortcut key identifier into an attribute of the form elements, for example: "< input shortcuts= "ctrl+alt+x"/"when browsing a web page containing the element, pressing the" ctrl+alt+x "key on the keyboard activates the event processing function corresponding to the shortcut key, i.e. triggers the screen capturing function.
Example 4
According to still another aspect of the embodiments of the present invention, there is further provided a storage medium including a stored program, where the device in which the storage medium is controlled to execute the method for setting a shortcut key or the method for processing a shortcut key in a page in the above embodiment 1 or 3 when the program runs.
Example 5
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be used to store the program code executed by the shortcut key setting method provided in the first embodiment.
Alternatively, in this embodiment, the storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: changing the attribute of the webpage element according to the obtained shortcut key identification; and setting a trigger event and a processing function of the shortcut key identification according to the webpage element attribute.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: the changing of the web page element attribute according to the obtained shortcut key identification comprises the following steps: acquiring the web page element attributes of all form elements in a web page; obtaining shortcut key identifiers of all form elements; writing the shortcut key identification into the web page element attribute to obtain the changed web page element attribute.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: before acquiring the webpage element attributes of all form elements in the webpage, acquiring a triggered webpage; and loading the webpage to obtain the successfully loaded webpage.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: obtaining all the table unit elements in the webpage comprises the following steps: traversing all form elements in the webpage through an application programming interface in the browser to obtain all form elements.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: the obtaining of the shortcut key identifiers of all form elements comprises the following steps: and acquiring shortcut key identifiers of all form elements from the attributes of all form elements.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: the triggering event and processing function for setting the shortcut key identification according to the webpage element attribute comprise: and setting trigger events and processing functions of the shortcut key identification through a browser script language according to the webpage element attribute.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (12)

1. A shortcut key setting method comprises the following steps:
changing the attribute of the webpage element according to the obtained shortcut key identification;
setting a trigger event and a processing function of the shortcut key identification according to the webpage element attribute;
wherein, changing the web page element attribute according to the obtained shortcut key identification comprises:
acquiring the web page element attributes of all form elements in a web page;
obtaining shortcut key identifiers of all form elements;
and writing the shortcut key identification into the webpage element attribute to obtain the changed webpage element attribute.
2. The method for setting a shortcut key according to claim 1, wherein before acquiring the web page element attributes of all form elements in a web page, the method further comprises:
acquiring a triggered webpage;
and loading the webpage to obtain the successfully loaded webpage.
3. The method for setting a shortcut key according to claim 1, wherein the obtaining all the table elements in the web page comprises:
traversing all form elements in the webpage through an application programming interface in the browser to obtain all the form elements.
4. The method for setting a shortcut key according to claim 1, wherein the obtaining shortcut key identifiers of all form elements includes:
and acquiring shortcut key identifiers of all the form elements from the attributes of all the form elements.
5. The method for setting a shortcut key according to claim 1, wherein the setting a trigger event and a processing function of the shortcut key identification according to the web page element attribute comprises:
and setting a trigger event and a processing function of the shortcut key identification through a browser script language according to the webpage element attribute.
6. A shortcut key setting device, comprising:
the changing module is used for changing the attribute of the webpage element according to the acquired shortcut key identification;
the setting module is used for setting a trigger event and a processing function of the shortcut key identification according to the webpage element attribute;
wherein the modification module comprises:
the first acquisition unit is used for acquiring the web page element attributes of all form elements in the web page;
the second acquisition unit is used for acquiring shortcut key identifiers of all form elements;
and the changing unit is used for writing the shortcut key identification into the webpage element attribute to obtain the changed webpage element attribute.
7. The shortcut key setting device of claim 6, wherein the device further comprises:
the acquisition module is used for acquiring the triggered web page before acquiring all the table element in the web page;
and the loading module is used for loading the webpage to obtain the successfully loaded webpage.
8. The shortcut key setting device according to claim 6, wherein the first acquisition unit includes:
the first obtaining subunit is configured to traverse all form elements in the web page through an application programming interface in the browser to obtain all the form elements.
9. The shortcut key setting device according to claim 6, wherein the second acquisition unit includes:
and the second acquisition subunit is used for acquiring the shortcut key identifiers of all the form elements from the attributes of all the form elements.
10. The shortcut key setting device of claim 6, wherein the setting module comprises:
and the setting unit is used for setting the trigger event and the processing function of the shortcut key identification through a browser script language according to the webpage element attribute.
11. A method for processing a shortcut key in a page comprises the following steps:
loading a page and determining page elements in the page;
acquiring a shortcut key identification in the page element; and changing the attribute of the webpage element according to the obtained shortcut key identification, wherein changing the attribute of the webpage element according to the obtained shortcut key identification comprises: acquiring the web page element attributes of all form elements in a web page; obtaining shortcut key identifiers of all form elements; writing the shortcut key identification into the webpage element attribute to obtain a modified webpage element attribute;
registering the triggering event and the processing function of the shortcut key identification.
12. A storage medium comprising a stored program, wherein the program, when run, controls a device in which the storage medium resides to perform: the shortcut key setting method of claim 1 or the in-page shortcut key processing method of claim 11.
CN201910009384.6A 2019-01-04 2019-01-04 Shortcut key setting method and device and shortcut key processing method and device in page Active CN111414164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910009384.6A CN111414164B (en) 2019-01-04 2019-01-04 Shortcut key setting method and device and shortcut key processing method and device in page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910009384.6A CN111414164B (en) 2019-01-04 2019-01-04 Shortcut key setting method and device and shortcut key processing method and device in page

Publications (2)

Publication Number Publication Date
CN111414164A CN111414164A (en) 2020-07-14
CN111414164B true CN111414164B (en) 2024-03-22

Family

ID=71493954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910009384.6A Active CN111414164B (en) 2019-01-04 2019-01-04 Shortcut key setting method and device and shortcut key processing method and device in page

Country Status (1)

Country Link
CN (1) CN111414164B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007280028A (en) * 2006-04-06 2007-10-25 Ricoh Co Ltd Information processor and method for setting/changing shortcut key
CN102243568A (en) * 2010-05-12 2011-11-16 索尼公司 Terminal apparatus, electronic apparatus, and access key assignment method and program
CN104111918A (en) * 2013-04-16 2014-10-22 腾讯科技(北京)有限公司 Barrier-free processing method and barrier-free web page device for web page content
CN105700796A (en) * 2015-12-31 2016-06-22 宇龙计算机通信科技(深圳)有限公司 Shortcut key control method, shortcut key control device and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9292156B2 (en) * 2012-01-09 2016-03-22 International Business Machines Corporation Enabling a user to invoke a function via a shortcut key in a multi-window computing environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007280028A (en) * 2006-04-06 2007-10-25 Ricoh Co Ltd Information processor and method for setting/changing shortcut key
CN102243568A (en) * 2010-05-12 2011-11-16 索尼公司 Terminal apparatus, electronic apparatus, and access key assignment method and program
CN104111918A (en) * 2013-04-16 2014-10-22 腾讯科技(北京)有限公司 Barrier-free processing method and barrier-free web page device for web page content
CN105700796A (en) * 2015-12-31 2016-06-22 宇龙计算机通信科技(深圳)有限公司 Shortcut key control method, shortcut key control device and mobile terminal

Also Published As

Publication number Publication date
CN111414164A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN107368487B (en) Dynamic layout method, device and client for page components
EP2990930B1 (en) Scraped information providing method and apparatus
CN111259284B (en) Method and device for lazy loading of page, storage medium and processor
TWI452527B (en) Method and system for application program execution based on augmented reality and cloud computing
CN104978267B (en) webpage test method, terminal and server
CN107291759B (en) Method and device for processing browser page resources
CN106294372A (en) Application program page quick access method and apply its mobile terminal
US20130227085A1 (en) Terminal and method for using cloud services
CN104918119B (en) Method for processing video frequency based on iOS browsers and video process apparatus
EP2733605A1 (en) Management method and device for webpage application program
US11080322B2 (en) Search methods, servers, and systems
CN101960452B (en) Methods, apparatuses and computer program products for providing a search form
EP2487612A1 (en) Apparatus and method for providing bookmark function in portable terminal
US20170169122A1 (en) Webpage display method, mobile terminal, intelligent terminal, program and storage medium
KR102127270B1 (en) Device and method for handheld operation
KR102024820B1 (en) Desktop sharing method and mobile terminal
WO2017041632A1 (en) Method and apparatus for transferring data in display page
Nielsen Usability for the masses
CN105653678A (en) Data chart subscription method and data chart subscription system
CN104424224A (en) File index storage method and device
CN110677506A (en) Network access method, device, computer equipment and storage medium
CN111414164B (en) Shortcut key setting method and device and shortcut key processing method and device in page
EP2998885A1 (en) Method and device for information search
US20140189478A1 (en) Web browsers for mobile and small screen devices
CN104536692A (en) Operation method of touch screen, touch device and touch terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant