CN106503009B - Method and device for transferring data in display page - Google Patents

Method and device for transferring data in display page Download PDF

Info

Publication number
CN106503009B
CN106503009B CN201510564253.6A CN201510564253A CN106503009B CN 106503009 B CN106503009 B CN 106503009B CN 201510564253 A CN201510564253 A CN 201510564253A CN 106503009 B CN106503009 B CN 106503009B
Authority
CN
China
Prior art keywords
target
key
target element
data
area
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
CN201510564253.6A
Other languages
Chinese (zh)
Other versions
CN106503009A (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 CN201510564253.6A priority Critical patent/CN106503009B/en
Priority to PCT/CN2016/096791 priority patent/WO2017041632A1/en
Publication of CN106503009A publication Critical patent/CN106503009A/en
Application granted granted Critical
Publication of CN106503009B publication Critical patent/CN106503009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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
    • G06F16/986Document structures and storage, e.g. HTML extensions

Abstract

The application discloses a method and a device for transferring data in a display page. Wherein, the method comprises the following steps: triggering a key press event of one or more source elements in a first area of a display page; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; data on a source element corresponding to the target element is cached on the target element. The method and the device solve the technical problem that the efficiency is low when elements in the page are transferred in the prior art.

Description

Method and device for transferring data in display page
Technical Field
The application relates to the field of computers, in particular to a method and a device for transferring data in a display page.
Background
Developers often repeatedly design web development platforms, for example, the same form, reference form, and structured data entry form in different areas, or the developers want to copy the structure and configuration of one area into another area, which requires the developers to repeatedly manually enter the same structure content, but the manual entry is prone to errors when the workload is high and cannot satisfy the association between data of different areas.
In the face of the above cumbersome workload, the developer may choose to use HTML5, for example, the developer uses HTML5 to drag and drop a DOM element in a page, that is, drag an object to another location after grabbing the object, for example, first add dragable value true to an attribute of the DOM element, and then record the dragged element by registering an event ondragstart on the DOM element while dragging, thereby implementing dragging of DOM elements between different areas in the page.
It should be noted that, using HTML5 to drag and drop elements in a page may cause the following problems:
1) the problem of inconsistency of rendering data required by the source element and the target element cannot be solved, that is, the user can only transfer data between two DOM elements with the same rendering data.
2) HTML5 does not support the movement of multiple DOM, and only moves DOM elements one by one, and the movement time is long.
3) HTML5 is not compatible with some browsers, such as IE6, IE7, IE8, and alternate versions of the browser, and the user wants to use HTML5L to transfer DOM elements and also update the version of the browser.
As can be seen from the above, no effective solution has been proposed to solve the problem of low efficiency in implementing element transfer in a page in the prior art.
disclosure of Invention
the embodiment of the invention provides a method and a device for transferring data in a display page, which are used for at least solving the technical problem of low efficiency in realizing element transfer in the page in the prior art.
According to an aspect of the embodiments of the present invention, there is provided a method for transferring data in a display page, including: triggering a key press event of one or more source elements in a first area of a display page; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; data on a source element corresponding to the target element is cached on the target element.
according to another aspect of the embodiments of the present invention, there is also provided a device for transferring data in a display page, including: the first trigger unit is used for triggering a key pressing event of one or more source elements in a first area in a display page; the acquisition unit is used for acquiring data related to one or more source elements according to the key pressing event and caching the data on the one or more source elements in the first area; the second trigger unit is used for triggering a key lifting event of a target element in a second area in the display page; the query unit is used for querying the source element corresponding to the target element according to the key lifting event and acquiring data cached on the source element corresponding to the target element; and the caching unit is used for caching the data on the source element corresponding to the target element on the target element.
in the embodiment of the invention, a key pressing event triggering one or more source elements in a first area in a display page is adopted; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; the mode of caching the data on the source element corresponding to the target element on the target element solves the technical problem of low efficiency in realizing element transfer in the page in the prior art.
Drawings
the accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
Fig. 1 is a block diagram of a hardware configuration of a computer terminal displaying a method of transferring data in a page according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative method for transferring data in a display page according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a method for transferring data in a display page according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative method for transferring data in a display page according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative method for transferring data in a display page according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative method for transferring data in a display page according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a device for transferring data in a display page according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 12 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 13 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 14 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application;
FIG. 15 is a schematic structural diagram of an alternative apparatus for transferring data in a display page according to an embodiment of the present application; and
Fig. 16 is a block diagram of a computer terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. 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 application.
it should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or 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 terms referred to in this application are to be interpreted as follows:
The DOM, a Document Object Model (DOM for short), is a standard programming interface for the W3C organization to process extensible markup language (xml) recommendations.
mouse events: the most commonly used event in Visual Basic programming, most controls support mouse operation, and the mouse event mainly comprises: the mouse comprises a mouse down and a mouse up, wherein the mouse down is an event generated when a mouse is pressed down, and the mouse up is an event generated when the mouse is lifted up.
Keyboard events: the events are triggered when a certain key of the keyboard is pressed down, and the keyboard events mainly include the following events:
(1) KeyDown: when a key on the keyboard is depressed.
(2) KeyUp: this occurs when a key on the keyboard is lifted.
(3) KeyPree: this event occurs after the keyboard is pressed and before the characters are displayed.
DIV container (DIV label): is an element used to provide structure and background for the content of a large block (block-level) in an HTML document, and all the content between the start tag and the end tag of a DIV is used to form this block, where the properties of the contained elements are controlled by the DIV tags.
Example 1
There is also provided, in accordance with an embodiment of the present application, an embodiment of a method for transferring data in a display page, including the steps illustrated in the flowchart of the figure, which may be executed in a computer system, such as a set of computer-executable instructions, and although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be executed in an order different than that illustrated or described herein.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the method running on a computer terminal, fig. 1 is a block diagram of a hardware structure of the computer terminal of a method for transferring data in a display page according to an embodiment of the present application. As shown in fig. 1, the computer terminal 10 may include one or more (only one shown) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. 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 configured to store software programs and modules of application software, such as program instructions/modules corresponding to the method for transferring data in a display page in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned vulnerability detection method for application programs. The 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 device 106 is used for receiving or transmitting data via a network. 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 (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
Under the operating environment, the application provides a method for transferring data in the display page as shown in fig. 2. Fig. 2 is a flowchart of a method for transferring data in a display page according to a first embodiment of the present application.
as shown in fig. 2, the method for transferring data in a display page may include the following implementation steps:
step S21, triggering a key press event of one or more source elements in a first region of the display page.
In the above step S21, the display page may be a display page for developing a web page in a browser. The source element included in the first region may be stored in a source DIV container, and the source element may be a DOM element. The DOM elements in the first region are used to implement the display schema of the page elements in the first region of the currently displayed page, e.g., a user may edit the DOM elements to implement the style, structure, or content of the forms, tags, or the like of the first region. When a user wishes to transfer data associated with a source element in a first region, a key press event pre-bound to the source element may be triggered.
Taking the example that the user moves the scene of the DOM element in the browser page, when the user uses the browser platform to develop the web page, the user wants to copy the content, structure or style of the memo in the first area to another area, that is, the data of the DOM element in the first area needs to be transferred to the corresponding target DOM element in the other area. For example, in the example shown in fig. 3, a user may trigger a key press event of a DOM1 element in the first area, where it should be noted that the DOM1 element is any source element in the first area, and the key press event may be a mousedown event that is pre-bound to a DOM1 element, for example.
It should be noted here that the application can move the cursor on the mouse and/or the keyboard to the source element to be copied, and at the time of pressing the key, a key pressing event (e.g. mousedown) bound to the source DOM element is triggered.
step S23, acquiring data associated with the one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area.
In step S23, after detecting a key press event that the user triggers one or more source elements in the first area of the display page, the data associated with the source element triggered by the user may be acquired, and the acquired data associated with the source element triggered by the user may be cached on the source element triggered by the user.
still taking the scenario of a user moving a DOM element in a browser page as an example, in connection with the example shown in fig. 3, when it is detected that a user triggered a key press event (e.g., mousedown) of DOM1 in a first region in a browser page, DATA1 associated with DOM1 is obtained according to the key press event (e.g., mousedown) of DOM1, and then DATA1 is cached on DOM1 of the above-mentioned first region.
Step S25, triggering a key up event for a target element in a second region of the display page.
In step S25, the target element included in the second area may be stored in the target DIV container, and the target element may be a DOM element, and in a scenario where the user adds data associated with the source element in the first area to the target element in the second area, the user may trigger a key up event of the target element in the second area after triggering a key down event of the source element in the first area. It should be noted that the key up event may be a mouseup pre-bound to the target element.
Still taking the scenario that the user moves the DOM element in the browser page as an example, in a scheme that the user adds data associated with the DOM1 element in the first area in the browser page to the DOM3 element in the second area, the user may trigger a key press event (e.g., mousedown) of the DOM1 element first and then trigger a key up event (e.g., mouseup) of the DOM3 element in the second area in the browser page, and it should be noted that the DOM3 element may be a target element in the second area.
It should be noted that the user may trigger a key press event of one or more source elements in the first area and may also trigger a key lift event of one or more target elements in the second area, that is, the present scheme may implement adding a batch of data associated with a plurality of source elements of the source area to a plurality of target elements in the target area.
Step S27, querying the source element corresponding to the target element according to the key-up event, and obtaining the data cached on the source element corresponding to the target element.
in step S27, after the user successively triggers the key press event of the source element in the first region and the key lift event of the target element in the second region, the source element corresponding to the target element may be queried according to the key lift event of the target element triggered by the user, and the data cached in the source element in step S23 may be obtained.
still taking the scene that the user moves the DOM elements in the browser page as an example, after detecting that the user triggers the key press event of the DOM1 element in the first region and the key lift event of the DOM3 element in the second region in sequence, the DOM1 element, which is the element corresponding to the DOM3 element, can be queried according to the key lift event of the DOM3 element, and then the data cached in the DOM1 element is obtained.
in step S29, data on the source element corresponding to the target element is cached on the target element.
In step S29, after the data cached in the source element in the first region is obtained, the data cached in the source element may be cached on the target element, so that the transfer of DOM element data between different regions is realized.
Still taking the scenario of a user moving a DOM element in a browser page as an example, as shown in fig. 3, a user wishing to transfer data associated with a DOM1 element in a DIV source container into a DOM3 element of a DIV target container may trigger a mouse-down event (e.g., a mouseup event) bound to DOM1 to transfer data associated with a DOM1 element into DOM 3.
As can be seen from the above, in the solution provided in the first embodiment of the present application, if a user wishes to add data associated with a source element in a first area to a target element in a second area, a key press event of one or more source elements in the first area may be triggered, and after detecting that the key press event is triggered, data associated with the source element may be cached in the source element, and then, after a key press event of the target element in the second area is triggered by the user, the solution may query the source element corresponding to the target element, and cache the obtained cached data in the source element in the target element.
in the first solution disclosed in the foregoing embodiment of the present application, if a user wishes to add data associated with a source element in a first area to a target element in a second area, a key press event of one or more source elements in the first area may be triggered, and after detecting that the key press event is triggered, data related to the source element may be cached in the source element, and then, after a key press up event of the target element in the second area is triggered by the user, the solution may query the source element corresponding to the target element, and cache the obtained cached data in the source element in the target element. It is easy to note that, in the process of transferring the source element in the first area to the target element in the second area, only the key press event and the key lift event supported in the current browser need to be triggered respectively, so as to trigger the data in the source element to be transferred, therefore, by the scheme provided by the embodiment of the present invention, the data from the source element which needs to be copied does not need to be manually entered in the target element, and simultaneously, one or more source elements can be transferred to the target element together, and the number of transfers is not limited, so that not only can the data transfer between elements in the page be automatically completed in batches, and the defect of low efficiency of the method for transferring element data provided by the prior art be avoided, but also in the web page development environment of the browser, developers can utilize the data transfer mechanism provided by the present application, according to the mechanism, after the trigger key pressing event, the data binding process of the source element is automatically completed, so that accurate transfer of data associated with the source element to the target element can be guaranteed. Therefore, the technical problem that the efficiency is low when elements in the page are transferred in the prior art is solved by the scheme of the first embodiment provided by the application.
It should be noted here that triggering the key-down event and the key-up event may be implemented by using keys in a mouse or a keyboard. In an alternative embodiment, the key press event is triggered when a pointer of a mouse or keyboard is placed over one or more elements in the first area and a key of the mouse or key of the keyboard is detected as being pressed.
Taking a scenario in which a user uses a mouse to complete moving DOM elements in a browser page as an example, in a scheme in which the user transfers data associated with DOM1 elements in a first area of the browser page, the user may move the mouse above DOM1 elements in the first area, and press a left button (or other button such as a right button or a wheel) of the mouse, so as to trigger a mouseup event of the left button (or other button such as a right button or a wheel).
It should be noted here that the above key pressing event of the present application can also be implemented by a keyboard key and a combination of keys in the keyboard. For example, a user may first press the TAB key, then press the directional control key in the keypad to move the mouse pointer over an area of DOM1 elements, and then press the Enter key to trigger a key down event for DOM1 elements.
It should be further noted that the above-mentioned manner for triggering a key-press event in the present application is not limited to a mouse or a keyboard, and for example, in a touch display screen, the key-press event can also be triggered by an electrical signal collected by the touch screen. That is, upon detecting the user touching the A coordinate on the touchscreen (the A coordinate being the coordinate of the DOM1 location displaying the page on the touchscreen), a key press event of DOM1 is triggered.
In an alternative embodiment provided by the present application, the key-up event is triggered after the pointer of the mouse or the keyboard is placed above the target element in the second area and the key of the mouse or the key of the keyboard is detected to be lifted.
Taking the scenario that the user uses a mouse to complete moving the DOM elements in the browser page as an example, in the scheme that the user transfers the data associated with the DOM1 elements in the first region to the DOM3 in the second region, the user can control the pointer of the mouse or keyboard to be above the DOM1 elements and press the buttons of the mouse or keyboard, and then the user can move the pointer of the mouse or keyboard to be above the DOM3 elements in the second region while keeping the mouse or keyboard buttons pressed, and then release the mouse buttons (left button, right button, scroll wheel or other buttons) or the buttons of the keyboard, at which time the button up event (e.g., mouseup event) of the DOM3 elements is triggered.
It should be further noted that, the above-mentioned manner for triggering the key-up event in the present application is not limited to a mouse or a keyboard, and for example, in a touch display screen, the triggering of the key-up event may also be implemented by an electrical signal collected by the touch screen. I.e., upon detecting the release of a user's finger placed on the touchscreen at the B coordinate (which is the coordinate of the DOM3 location displaying the page on the touchscreen), then a key up event for the DOM3 element is triggered.
in an optional embodiment provided by the present application, before triggering a key lift event of a target element in a second area of the display page in step S25, the present solution may further include:
Step S24, under the state that the button of the mouse or the button of the keyboard is kept pressed, the pointer of the mouse or the keyboard is controlled to move to a second area in the display page; and at any moment, if the pointer of the mouse or the key is detected to move to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted, starting a key lifting event for triggering the target element in the second area.
In step S24, when the user moves the mouse pointer or the keyboard pointer above the source element in the first area, the user presses the mouse button or the keyboard button to trigger a keyboard pressing event, the user keeps the pressed state of the mouse button or the keyboard button, moves the mouse pointer or the keyboard pointer above the target element in the second area at any time, and then releases or lifts the mouse button or the keyboard button at any time to trigger a button lifting event of the target element in the second area.
Still taking the scenario that the user moves DOM elements in a browser page as an example, when the user moves a mouse pointer or a keyboard pointer over DOM1 elements in a first area, the user presses a mouse button or a keyboard button to trigger a button down event (e.g., a mouseedown event) pre-bound to DOM1 elements, when the user maintains the state of the mouse button or the keyboard button pressing, at any time, the mouse pointer or the keyboard pointer is moved over DOM3 elements in a second area, and then at any time, the mouse button or the keyboard button is released or lifted to trigger a button up event (mouseup) pre-bound to DOM3 elements, so that the user can realize the data transfer of DOM elements between different areas of the page by controlling the mouse dragging.
As can be seen from the above, according to the scheme, data associated with a DOM element in a first area in a display page can be dragged and copied to a DOM element in a second area by means of a predefined mouse event (mousedown event, mouseup event), so as to implement transfer of data in the display page. It should be noted that, if the data associated with multiple DOM elements are to be dragged and transferred simultaneously, any key on the keyboard, preferably the shifit key, may be used.
in an optional embodiment provided by the present application, before triggering a key lift event of a target element in a second area of the display page in step S25, the present solution may further include:
step S241, in a state that the key of the mouse or the key of the keyboard is pressed, controlling the pointer of the mouse or the keyboard to move to a third area in the display page, where the third area is any area except the target element in the display page, and a key lift event or a click event triggered in the third area cannot start querying the source element corresponding to the target element.
In step S241, after the user triggers the key press event in the source element in the first area, the user may also control the pointer of the mouse or the keyboard to move to a third area in the display page, where the pointer of the mouse or the keyboard cannot be located above any target element in the second area, and therefore, the user cannot start querying the source element corresponding to the target element by triggering any click event or key lift event in the third area.
In step S242, at any time, if it is detected that the pointer of the mouse or the key moves from the third area to the top of the target element in the second area and the key of the mouse or the key of the keyboard is lifted, a key lift event triggering the target element in the second area is initiated.
In step S242, when the user moves the mouse pointer or the keyboard pointer to the third area, although the user cannot start querying the source element corresponding to the target element by triggering any click event or key lift event in the third area, the user may release or lift the mouse or the keyboard in the third area, and then trigger the key lift event of the target element in the second area.
Still taking the scenario where the user moves DOM elements in a browser page as an example, as shown in fig. 4, the user wishes to transfer data associated with a DOM1 element in a first region into a DOM3 element in a second region, the user operates a mouse or keyboard pointer, when the mouse pointer is above DOM1, a button of the mouse or keyboard is pressed, and in a state where the button of the mouse or keyboard is held pressed, the user continues to operate the mouse or the keyboard, moves the mouse pointer or the keyboard pointer to a third area of the position outside the DOM element, alternatively, as shown in FIG. 4, the third position is the position of the border of the displayed page, when the mouse pointer is in the third region, although the user has not selected the DOM3 element in the second region, but the user may also release or lift the mouse or keyboard, which triggers a key lift event for a DOM3 element in the second region.
In an alternative embodiment provided by the present application, before the step S21, triggering a key press event of one or more source elements in the first area of the display page, the present solution may further include:
Step S20, sets the attribute value of the pull-out attribute of each source element within the first region, and sets the attribute value of the pull-in attribute of each target element within the second region.
In step S20, before triggering the DOM elements in the first area, the drag-out attribute value drag-out-name of each DOM element in the first area and the attribute value drag-in-name of the DOM element in the second area may be added in advance, for example, the drag-out-name of the DOM1 element in the first area is set to 0, and the drag-in-name of the DOM3 in the second area is set to 0.
Optionally, in step S27, the step of querying the source element corresponding to the target element according to the key up event includes:
In step S271, if it is detected that the key up event of the target element is triggered, the attribute value of the pull-in attribute of the target element is read.
Step S272, by finding the source element whose attribute value of the pull-out attribute is the same as the attribute value of the pull-in attribute of the target element, determining the source element corresponding to the target element.
In the foregoing steps S271 to S272 of the present application, after detecting that the key-up event of the target element in the second area is triggered, the value of the drag attribute of the target element is read, then the source element having the same drag attribute as the value of the drag attribute is searched for in the first area, and is determined to be the source element corresponding to the target element, and then the step S29 is continuously executed.
Still taking the scene that the user moves the DOM elements in the browser page as an example, after detecting that the key lift event of the DOM3 in the second region is triggered, the drag-in attribute value of the DOM3 is read, the drag-in attribute of the DOM3 is 0, and then the DOM1 element with the drag-out attribute value also being 0 is found in the first region, and then the DOM1 element in the first region is determined to correspond to the DOM3 element in the second region.
It should be noted here that, in the present solution, the pull-out attribute value of the single DOM element in the first area may be the same as the pull-in attribute values of the multiple DOM elements in the second area, and the pull-in attribute value of the single DOM element of the DOM elements in the second area may be the same as the pull-out attribute values of the multiple DOM elements in the first area, that is, the present solution may also implement that data associated with one DOM element in the first area is simultaneously added to the multiple DOM elements in the second area, and data associated with the multiple DOM elements in the first area is also simultaneously added to one DOM element in the second area.
Optionally, after caching the data on the one or more source elements in the first region in step S23, the method may further include:
Step S231, if it is detected that the source element in which the data is cached has a drag action, setting an attribute value of a drag attribute of the source element in which the drag action has occurred as a tube, wherein after finding a source element whose attribute value of the drag-out attribute is the same as the attribute value of the drag-in attribute of the target element, if the attribute value of the drag attribute of the source element is tube, determining that the source element whose attribute value of the drag attribute is tube is the source element corresponding to the target element.
in step S231 of the present application, after caching data in DOM elements in the first area, if a user triggers a key press event of a DOM element in the first area and controls a mouse or a keyboard pointer to move, it indicates that the user drags a DOM element in the first area, a drag attribute dragable of the DOM element in the first area dragged by the user is set to true, and after finding multiple DOM elements with the same attribute value of the drag attribute of the DOM element in the second area in step S272, if the drag attribute value of one or more DOM elements in the multiple DOM elements is true, it is determined that the DOM element with the drag attribute value of true is a source element corresponding to the DOM element in the second area.
still taking the scene that the user moves the DOM elements in the browser page as an example, the user controls the mouse or keyboard pointer to be above the DOM1 element in the first area and presses the mouse or keyboard to trigger the key press event of the DOM1 element in the first area, and operates the mouse or keyboard pointer to move, which indicates that the user drags the DOM1 element and also indicates that the user is transferring data associated with the DOM1 element, the present scheme sets the drag attribute of the DOM1 element to uetr, then the user releases or lifts the mouse or keyboard to trigger the key lift event of the DOM3 when the mouse or keyboard pointer is above the DOM3 in the second area, reads the drag attribute value 0 of the DOM3 element, queries a plurality of DOM elements with the drag attribute value of 0 in the first area, and queries a DOM1 element with the drag attribute value of true in the plurality of DOM elements with the drag attribute value of 0, the DOM1 element is determined to correspond to the DOM3 element and the data cached in the DOM1 element is retrieved and cached on the DOM3 element.
Optionally, in step S29, after caching the data on the source element corresponding to the target element on the target element, the present scheme may further include:
Step S30, delete the attribute value of the drag attribute of the source element, and clear the data cached on the source element.
in step S30, after transferring the data associated with the DOM element in the first area to the DOM element in the second area, the present scheme deletes the attribute value of the drag attribute dragable of the DOM element in the first area and then clears the data cached on the DOM element.
Still taking the scenario that the user moves the DOM element in the browser page as an example, as shown in fig. 5, this scheme registers method C, i.e. a Drag method, in the source DIV container in advance, and registers method D, i.e. a Drop method, in the target DIV container, where the Drag method is used to add a Drag-out-name attribute value of 0 to the DOM1 element in the source DIV container, and to bind an event, i.e. a key press event, to the DOM1 element (e.g. mousedown). The Drop method is used to add a drag-out-name attribute value of 0 to DOM3 of the target DIV container, and bind B, a key up event (e.g., mouseup), to the DOM3 element. When a user triggers a mousedown event of DOM1 in the source DIV container, DATA DATA1 associated with a DOM1 element is read, the DATA DATA1 is cached on a DOM1 element of the source DIV container, and a drag attribute value of "true" is added to DOM 1. When a user triggers a mouseup event of DOM3 in the target DIV container, reading a drain-in-name attribute value 0 of DOM3, finding a DOM1 in which the drain-out-name attribute value is also 0 and the drain is true in one or more DOMs of the source region, and determining that the DOM1 is a DOM element corresponding to DOM 3. The cached (bound) data in the DOM1 is then read, the target-area DOM is then rendered, and the cached data in the read DOM1 is cached (bound) on the target DOM. Finally, the dragable attribute of the source DOM1 is deleted, and the cached data is cleaned up.
optionally, after acquiring the data cached on the source element corresponding to the target element in step S27, the present scheme may further include:
Step S273, accessing the target server according to the element information of the target element.
In step S274, target data acquired by the target server according to the element information is received.
in step S275, the target data and the data on the source element corresponding to the target element are cached on the target element.
In the above steps S273 to S275 of the present application, after the data of the DOM elements cached in the first area is obtained, the element information of the DOM elements in the second area may be obtained, and the target server is accessed through the element information, where the target server stores the target data corresponding to the DOM elements in the second area, and after the target server is accessed according to the element information of the DOM elements in the second area, the present solution may receive the target data fed back by the target server, and then the present solution caches the data of the DOM elements cached in the first area and the target data on the DOM elements in the second area at the same time.
Still taking the scene that the user moved the DOM element in the browser page as an example, in the scheme that the user transferred the DATA associated with the DOM1 element in the first area into the DOM3 element in the second area, after caching the DATA1 associated with the DOM1 on the DOM3 element, the DATA2 corresponding to the DOM3 element can be obtained from the destination server according to the element information of the DOM3, and then the DATA1 together with the DATA2 is cached in the DOM 3.
Optionally, in step S275, after caching both the target data and the data on the source element corresponding to the target element on the target element, the method may further include:
in step S276, the target element is rendered in a second region of the display page.
In step S276 of the present application, after caching target data corresponding to a target element in a second region and data on a source element in a first region in the target element in the second region, the present solution may further render the target element in the second region to generate an environment in which data is bound to the target element, where it should be noted that, in this embodiment, the data of the source element is used to render the target element, and a problem that rendering data of the source element and rendering data of the target element must be the same when html5 realizes dragging the DOM element can be solved.
Optionally, in step S275, after caching both the target data and the data on the source element corresponding to the target element on the target element, the method may further include:
Step S2751, packing the target data cached in the target element and the data of the source element corresponding to the target element, and generating update data of the target element.
Step S2752, sending the update data of the target element to the target server, and replacing the target data previously stored in the target server.
Still taking the scene that the user moves the DOM element in the browser page as an example, after the target DATA1 corresponding to the element information of the DOM3 element in the second area and the DATA2 of the DOM1 element in the first area are both cached on the DOM3 element, the present solution may also package and update all the DATA cached on the DOM3 and send the DATA to the target server to replace the target DATA saved before the target server.
The application scenario of user transferring DOM elements in a page is described in detail below with reference to fig. 6, that is, the present solution may implement the following steps to transfer data associated with DOM1 in a source DIV container to DOM3 in a target DIV container.
step A, add a drag-out-name value of 0 to DOM1 in the source DIV container, bind a key press event (e.g., a mousedown event) to DOM 1.
step B, add drag-in-name value 0 to DOM3 in the target DIV container, bind key-up event (e.g., mouseup event) to DOM 3.
And step C, triggering a mousedown event, acquiring associated DATA DATA1 of DOM1, binding DATA1 to DOM1, and setting the attribute value dragable of DOM1 to true.
And D, triggering a mouseup event, and reading a drag-in-name value 0 of the DOM 3.
Step E: and finding the DOM1 in which the value of the flag-out-name is also 0 and the flag is true in the source DIV container according to the value of the flag-in-name is 0.
step F, send DATA1 to the destination DIV container.
step G, obtaining DATA1, and reading element information of DOM 3.
Step H, accessing the target server according to the element information of DOM 3.
Step I, the target server sends DATA2 corresponding to the element information of DOM3 to the target DIV container.
At step J, the target DIV container receives DATA1 and buffers DATA1 and DATA2 on the DOM 3.
Step K, the target DIV container renders the DOM3 using DATA1 and DATA 2.
at step L, the destination DIV container packages DATA1 and DATA3 to generate update DATA.
And step M, the target DIV container sends the update data to the target server.
And step N, the target server replaces the previously saved data with the updated data.
Step O, the source DIV container deletes the dragable property of DOM1, cleaning up the data cached on DOM 1.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Example 2
according to an embodiment of the present application, there is further provided a device for transferring data in a display page, which is used for implementing the method for transferring data in a display page, as shown in fig. 7, the device may include: the device comprises a first triggering unit 51, an obtaining unit 53, a second triggering unit 55, an inquiring unit 57 and a caching unit 59.
The first triggering unit 51 is configured to trigger a key press event of one or more source elements in a first area in a display page; an obtaining unit 53, configured to obtain data associated with one or more source elements according to a key press event, and cache the data on the one or more source elements in the first area; a second triggering unit 55, configured to trigger a key-up event of a target element in a second area in the display page; the query unit 57 is configured to query the source element corresponding to the target element according to the key lifting event, and acquire data cached in the source element corresponding to the target element; and a caching unit 59, configured to cache data on the source element corresponding to the target element on the target element.
it should be noted here that the first triggering unit 51, the obtaining unit 53, the second triggering unit 55, the querying unit 57, and the caching unit 59 correspond to steps S21 to S29 in the first embodiment, and the five units are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
as can be seen from the above, in the solution provided in the second embodiment of the present application, if a user wants to add data associated with a source element in a first area to a target element in a second area, a key press event of one or more source elements in the first area may be triggered, and after detecting that the key press event is triggered, the solution may obtain data associated with the source element and cache the data in the source element, and then, after a user triggers a key lift event of a target element in the second area, the solution may query the source element corresponding to the target element, obtain data cached in the source element, and cache the data in the target element, and according to the solution, the user may transfer data associated with a DOM element in a display page only by triggering a key press event and a key lift event preset on the display interface, the technical problem of low efficiency in realizing element transfer in the page in the prior art is solved.
alternatively, a key press event is triggered when a pointer of a mouse or keyboard is placed over one or more elements in the first area and a key of the mouse or a key of the keyboard is detected to be pressed.
Optionally, the key lifting event is triggered when a pointer of the mouse or the keyboard is placed above the target element in the second area and the key of the mouse or the key of the keyboard is lifted.
Optionally, as shown in fig. 8, the apparatus may further include: a first control unit 61 and a first starting unit 63.
the first control unit 61 is used for controlling the pointer of the mouse or the keyboard to move to a second area in the display page under the state that the keys of the mouse or the keys of the keyboard are kept pressed; and a first starting unit 63, configured to start a key up event triggering the target element in the second area if it is detected that the pointer of the mouse or the key moves above the target element in the second area and the key of the mouse or the key of the keyboard is up at any time.
here, the first control unit 61 and the first activating unit 63 are described above. Corresponding to step S24 in the first embodiment, the two units are the same as those of the corresponding step, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
optionally, as shown in fig. 9, the apparatus may further include: a second control unit 71 and a second starting unit 73.
The second control unit 71 is configured to control the pointer of the mouse or the keyboard to move to a third area in the display page in a state where the button of the mouse or the button of the keyboard is kept pressed, where the third area is any one area of the display page except for the target element, and a button lift event or a click event triggered in the third area cannot start querying a source element corresponding to the target element; and a second starting unit 73, configured to start a key up event triggering the target element in the second area if it is detected that the pointer of the mouse or the key moves from the third area to above the target element in the second area and the key of the mouse or the key of the keyboard is up at any time.
It should be noted that, the second control unit 71 and the second starting unit 73 correspond to steps S241 to S242 in the first embodiment, and the two units are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Optionally, as shown in fig. 10, the apparatus may further include: a first setting unit 81.
The first setting unit 81 is configured to set an attribute value of a pull-out attribute of each source element in the first region, and set an attribute value of a pull-in attribute of each target element in the second region.
It should be noted here that the first setting unit 81 corresponds to step S20 in the first embodiment, and the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Alternatively, the querying unit 57 may include: the reading module 571, the determining module 572.
The reading module 571 is configured to, if it is detected that the key up event of the target element is triggered, read an attribute value of the pull-in attribute of the target element; the determining module 572 is configured to determine, by finding a source element whose attribute value of the pull-out attribute is the same as the attribute value of the pull-in attribute of the target element, a source element corresponding to the target element.
It should be noted here that the reading module 571 and the determining module 572 correspond to steps S271 to S272 in the first embodiment, and the two modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Optionally, as shown in fig. 11, the apparatus may further include: a second setting unit 91, a processing unit 92.
The second setting unit 91 is configured to set, if it is detected that the source element in which the data is cached has a drag action, an attribute value of a drag attribute of the source element in which the drag action has occurred as tube, and the processing unit 92 is configured to, after finding a source element whose drag attribute value is the same as an attribute value of a drag attribute of a target element, determine, if the attribute value of the drag attribute of the source element is tube, that the source element whose attribute value of the drag attribute is tube is a source element corresponding to the target element.
It should be noted that the second setting unit 91 and the processing unit 92 correspond to the step S231 in the first embodiment, and the units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Optionally, as shown in fig. 12, the apparatus may further include: and a deleting unit 101.
The deleting unit 101 is configured to delete an attribute value of a drag attribute of a source element, and clear data cached on the source element.
It should be noted that the deleting unit 101 corresponds to step S30 in the first embodiment, and the units are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
optionally, as shown in fig. 13, the apparatus may further include: an access unit 111, a receiving unit 113, and a storage unit 115.
Wherein, the accessing unit 111 is configured to access the target server according to the element information of the target element; a receiving unit 113, configured to receive target data acquired by the target server according to the element information; and the storage unit 115 is configured to cache the target data and the data on the source element corresponding to the target element on the target element.
It should be noted here that the accessing unit 111, the receiving unit 113, and the storing unit 115 correspond to steps S273 to S275 in the first embodiment, and the three units are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Optionally, as shown in fig. 14, the apparatus may further include: a rendering unit 121.
Wherein the rendering unit 121 is configured to render the target element in the second area of the display page.
it should be noted here that the rendering unit 121 corresponds to step S276 in the first embodiment, and the units are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Optionally, as shown in fig. 15, the apparatus may further include: an updating unit 131 and a replacing unit 133.
The updating unit 131 is configured to package target data cached on the target element and data of the source element corresponding to the target element, and generate update data of the target element; a replacing unit 133, configured to send the update data of the target element to the target server, and replace the target data stored in the target server before.
it should be noted here that the updating unit 131 and the replacing unit 133 correspond to steps S2751 to S2752 in the first embodiment, and the above units are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the first embodiment. It should be noted that the modules described above as part of the apparatus may be run in the computer terminal 10 provided in the first embodiment.
Example 3
the embodiment of the application can provide a computer terminal, and the computer terminal can be any one computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced with a terminal device such as a mobile terminal.
Optionally, in this embodiment, the computer terminal may be located in at least one network device of a plurality of network devices of a computer network.
In this embodiment, the computer terminal may execute the program code of the following steps in the method for transferring data in a display page: triggering a key press event of one or more source elements in a first area of a display page; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; data on a source element corresponding to the target element is cached on the target element.
Alternatively, fig. 16 is a block diagram of a computer terminal according to an embodiment of the present application. As shown in fig. 16, the computer terminal a may include: one or more processors 510 (only one of which is shown), a memory 530, and a transmission device 550.
the memory 530 may be used to store software programs and modules, such as program instructions/modules corresponding to the security vulnerability detection method and apparatus in the embodiment of the present application, and the processor 510 executes various functional applications and data processing by running the software programs and modules stored in the memory 530, that is, implements the above-mentioned detection method for system vulnerability attacks. The memory 530 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, memory 530 may further include memory located remotely from processor 510, which may be connected to terminal a through 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 device 550 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 550 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 550 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The memory 530 is used for storing preset action conditions, information of a preset authorized user, and an application program.
Processor 510 may invoke the information and applications stored in memory 530 via a transmission device to perform the following steps: triggering a key press event of one or more source elements in a first area of a display page; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; data on a source element corresponding to the target element is cached on the target element.
Optionally, the processor 510 may further execute the program code of the following steps: a key press event is triggered when a pointer of a mouse or keyboard is placed over one or more elements in the first area and a key of the mouse or a key of the keyboard is detected to be pressed.
Optionally, the processor 510 may further execute the program code of the following steps: and when the pointer of the mouse or the keyboard is placed above the target element in the second area and the key of the mouse or the key of the keyboard is detected to be lifted, triggering a key lifting event.
Optionally, the processor 510 may further execute the program code of the following steps: before triggering the key up event, the method further comprises: controlling the pointer of the mouse or the keyboard to move to a second area in the display page under the state that the keys of the mouse or the keys of the keyboard are kept pressed; and at any moment, if the pointer of the mouse or the key is detected to move to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted, starting a key lifting event for triggering the target element in the second area.
Optionally, the processor 510 may further execute the program code of the following steps: before triggering the key up event, the method further comprises: controlling a pointer of the mouse or the keyboard to move to a third area in the display page under the condition that the keys of the mouse or the keys of the keyboard are kept pressed, wherein the third area is any one area except the target elements in the display page, and the key lifting event or the click event triggered in the third area cannot start to inquire the source elements corresponding to the target elements; at any time, if it is detected that the pointer of the mouse or the key moves from the third area to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted, a key lifting event triggering the target element in the second area is started.
Optionally, the processor 510 may further execute the program code of the following steps: prior to triggering a key press event that displays one or more source elements within a first region of a page, the method further comprises: setting an attribute value of a pull-out attribute of each source element in the first region, and setting an attribute value of a pull-in attribute of each target element in the second region; the step of querying the source element corresponding to the target element according to the key lifting event comprises the following steps: if the key lifting event of the target element is triggered, reading the attribute value of the pull-in attribute of the target element; and determining the source element corresponding to the target element by finding the source element with the attribute value of the pull-out attribute being the same as the attribute value of the pull-in attribute of the target element.
Optionally, the processor 510 may further execute the program code of the following steps: after caching data on the one or more source elements within the first region, the method further comprises: and if the source element with the cached data is detected to have a drag action, setting the attribute value of the drag attribute of the source element with the drag action as the tube, wherein after the source element with the drag attribute value being the same as the attribute value of the drag attribute of the target element is found, if the attribute value of the drag attribute of the source element is the tube, determining that the source element with the drag attribute value of the tube is the source element corresponding to the target element.
Optionally, the processor 510 may further execute the program code of the following steps: after caching data on a source element corresponding to a target element on the target element, the method further comprises: and deleting the attribute value of the drag attribute of the source element, and clearing the data cached on the source element.
Optionally, the processor 510 may further execute the program code of the following steps: after obtaining the data cached on the source element corresponding to the target element, the method further comprises: accessing a target server according to element information of a target element; receiving target data acquired by a target server according to the element information; and caching the target data and the data on the source element corresponding to the target element on the target element.
optionally, the processor 510 may further execute the program code of the following steps: after obtaining the data cached on the source element corresponding to the target element, the method further comprises: the target element is rendered in a second region of the display page.
Optionally, the processor 510 may further execute the program code of the following steps: after caching both the target data and the data on the source element corresponding to the target element on the target element, the method further comprises: packaging target data cached on the target element and data of a source element corresponding to the target element to generate update data of the target element; and sending the updated data of the target element to the target server to replace the target data stored in the target server.
by adopting the embodiment of the application, a scheme of a method for transferring data in a display page is provided. Triggering a key press event of one or more source elements in a first area of a display page; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; the data on the source element corresponding to the target element is cached on the target element, so that the aim of reducing the error rate of filling the form is fulfilled, and the technical problem of low efficiency in realizing element transfer in the page in the prior art is solved.
It can be understood by those skilled in the art that the structure shown in fig. 16 is only an illustration, and the computer terminal may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 16 is a diagram illustrating a structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 16, or have a different configuration than shown in FIG. 16.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
example 4
embodiments of the present application also provide a storage medium. Optionally, in this embodiment, the storage medium may be configured to store a program code executed by the method for transferring data in the display page provided in the first embodiment.
Optionally, in this embodiment, the storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: triggering a key press event of one or more source elements in a first area of a display page; acquiring data associated with one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area; triggering a key lifting event of a target element in a second area in the display page; inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element; data on a source element corresponding to the target element is cached on the target element.
It should be noted here that any one of the computer terminal groups may establish a communication relationship with the web server and the scanner, and the scanner may scan the value commands of the web application executed by the php on the computer terminal.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (20)

1. A method for transferring data in a display page is characterized by comprising the following steps:
Triggering a key press event of one or more source elements in a first area of a display page;
Acquiring data associated with the one or more source elements according to the key press event, and caching the data on the one or more source elements in the first area;
Triggering a key lifting event of a target element in a second area in the display page;
inquiring a source element corresponding to the target element according to the key lifting event, and acquiring data cached on the source element corresponding to the target element;
Caching data on a source element corresponding to the target element on the target element;
prior to triggering a key press event that displays one or more source elements within a first region of a page, the method further comprises:
Setting an attribute value of a pull-out attribute of each source element in the first region, and setting an attribute value of a pull-in attribute of each target element in the second region;
Wherein the step of querying the source element corresponding to the target element according to the key up event comprises:
If the key lifting event of the target element is triggered, reading the attribute value of the pull-in attribute of the target element;
And determining the source element corresponding to the target element by finding the source element with the attribute value of the pull-out attribute being the same as the attribute value of the pull-in attribute of the target element.
2. The method of claim 1, wherein the key press event is triggered after a mouse or keyboard pointer is placed over one or more elements in the first region and a key of the mouse or a key of the keyboard is detected to be pressed.
3. The method of claim 1, wherein the key up event is triggered when a pointer of a mouse or keyboard is placed over the target element in the second region and a key of the mouse or a key of the keyboard is detected as being up.
4. The method of claim 3, wherein prior to triggering the key up event, the method further comprises:
Controlling the pointer of the mouse or the keyboard to move to the second area in the display page under the state that the keys of the mouse or the keys of the keyboard are kept pressed;
And at any moment, if the pointer of the mouse or the key is detected to move to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted, starting a key lifting event for triggering the target element in the second area.
5. The method of claim 3, wherein prior to triggering the key up event, the method further comprises:
controlling a pointer of the mouse or the keyboard to move to a third area in the display page under the condition that the keys of the mouse or the keyboard are kept pressed, wherein the third area is any one area except the target element in the display page, and a key lifting event or a click event triggered in the third area cannot start to inquire a source element corresponding to the target element;
And at any moment, if the pointer of the mouse or the key is detected to move from the third area to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted, starting a key lifting event triggering the target element in the second area.
6. The method of claim 1, wherein after caching the data on the one or more source elements within the first region, the method further comprises: if the source element which buffers the data is detected to have a drag action, setting the attribute value of the drag attribute of the source element which has the drag action as true,
After finding the source element with the attribute value of the dragged-out attribute identical to the attribute value of the dragged-in attribute of the target element, if the attribute value of the dragged-out attribute of the source element is tune, determining that the source element with the attribute value of the dragged-out attribute as tune is the source element corresponding to the target element.
7. the method of claim 1, wherein after caching data on a source element corresponding to the target element on the target element, the method further comprises:
and deleting the attribute value of the drag attribute of the source element, and clearing the data cached on the source element.
8. the method of claim 1, wherein after obtaining data cached on a source element corresponding to the target element, the method further comprises:
accessing a target server according to the element information of the target element;
receiving target data acquired by the target server according to the element information;
Caching the target data and the data on the source element corresponding to the target element on the target element.
9. The method of claim 1 or 8, wherein after obtaining data cached on a source element corresponding to the target element, the method further comprises:
Rendering the target element in a second region of the display page.
10. The method of claim 8, wherein after caching the target data and data on a source element corresponding to the target element on the target element, the method further comprises:
Packaging the target data cached on the target element and the data of the source element corresponding to the target element to generate update data of the target element;
And sending the updated data of the target element to the target server to replace the target data stored in the target server before.
11. a transfer apparatus for transferring data in a display page, comprising:
The first trigger unit is used for triggering a key pressing event of one or more source elements in a first area in a display page;
An obtaining unit, configured to obtain data associated with the one or more source elements according to the key press event, and cache the data on the one or more source elements in the first region;
the second triggering unit is used for triggering a key lifting event of a target element in a second area in the display page;
The query unit is used for querying the source element corresponding to the target element according to the key lifting event and acquiring data cached on the source element corresponding to the target element;
The cache unit is used for caching data on a source element corresponding to the target element on the target element;
The device further comprises:
A first setting unit, configured to set an attribute value of a pull-out attribute of each source element in the first region, and set an attribute value of a pull-in attribute of each target element in the second region;
Wherein the query unit comprises:
the reading module is used for reading the attribute value of the pull-in attribute of the target element if the key lifting event of the target element is triggered;
and the determining module is used for determining the source element corresponding to the target element by finding the source element of which the attribute value of the pull-out attribute is the same as that of the pull-in attribute of the target element.
12. The apparatus of claim 11, wherein the key press event is triggered when a mouse or keyboard pointer is placed over one or more elements in the first area and a key of the mouse or a key of the keyboard is detected to be pressed.
13. the apparatus of claim 11, wherein the key up event is triggered when a pointer of a mouse or a keyboard is placed over the target element in the second area and a key of the mouse or a key of the keyboard is detected to be up.
14. The apparatus of claim 13, further comprising:
The first control unit is used for controlling a pointer of the mouse or the keyboard to move to the second area in the display page under the state that the keys of the mouse or the keys of the keyboard are kept pressed;
and the first starting unit is used for starting a key lifting event triggering the target element in the second area if the situation that the pointer of the mouse or the key is moved to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted is detected at any time.
15. The apparatus of claim 13, further comprising:
the second control unit is used for controlling a pointer of the mouse or the keyboard to move to a third area in the display page under the condition that the keys of the mouse or the keys of the keyboard are kept pressed, wherein the third area is any one area except the target element in the display page, and a key lifting event or a click event triggered in the third area cannot start to inquire a source element corresponding to the target element;
And the second starting unit is used for starting a key lifting event for triggering the target element in the second area if the situation that the pointer of the mouse or the key moves from the third area to the position above the target element in the second area and the key of the mouse or the key of the keyboard is lifted is detected at any time.
16. The apparatus of claim 11, further comprising: a second setting unit configured to set an attribute value of a drag attribute of a source element in which a drag action has occurred to future if it is detected that the drag action has occurred with respect to the source element in which data is cached,
Wherein the apparatus further comprises: and if the attribute value of the drag attribute of the source element is "tune", determining that the source element with the attribute value of the drag attribute of "tune" is the source element corresponding to the target element.
17. The apparatus of claim 16, further comprising:
And the deleting unit is used for deleting the attribute value of the dragging attribute of the source element and clearing the data cached on the source element.
18. The apparatus of claim 11, further comprising:
An access unit for accessing a target server according to element information of the target element;
A receiving unit, configured to receive target data acquired by the target server according to the element information;
And the storage unit is used for caching the target data and the data on the source element corresponding to the target element on the target element.
19. The apparatus of claim 11 or 18, further comprising:
A rendering unit to render the target element in a second region of the display page.
20. The apparatus of claim 18, further comprising:
the updating unit is used for packaging the target data cached on the target element and the data of the source element corresponding to the target element to generate updating data of the target element;
and the replacing unit is used for sending the update data of the target element to the target server and replacing the target data stored in the target server before.
CN201510564253.6A 2015-09-07 2015-09-07 Method and device for transferring data in display page Active CN106503009B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510564253.6A CN106503009B (en) 2015-09-07 2015-09-07 Method and device for transferring data in display page
PCT/CN2016/096791 WO2017041632A1 (en) 2015-09-07 2016-08-25 Method and apparatus for transferring data in display page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510564253.6A CN106503009B (en) 2015-09-07 2015-09-07 Method and device for transferring data in display page

Publications (2)

Publication Number Publication Date
CN106503009A CN106503009A (en) 2017-03-15
CN106503009B true CN106503009B (en) 2019-12-06

Family

ID=58239143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510564253.6A Active CN106503009B (en) 2015-09-07 2015-09-07 Method and device for transferring data in display page

Country Status (2)

Country Link
CN (1) CN106503009B (en)
WO (1) WO2017041632A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932240B (en) * 2017-05-23 2020-11-17 华为技术有限公司 Method, device, equipment and storage medium for accelerating cursor movement in network view
CN111104109A (en) * 2018-10-29 2020-05-05 北京数聚鑫云信息技术有限公司 Method, system, medium and computer equipment for processing right-click menu on WEB page
CN109684400A (en) * 2018-12-29 2019-04-26 国网江苏省电力有限公司 A method of the master data management automation based on RPA finance robot
CN110764674B (en) * 2019-09-12 2021-03-26 湖南新云网科技有限公司 Method and system for erasing note primitives of electronic whiteboard and electronic whiteboard
CN111913637B (en) * 2020-08-28 2024-01-02 平安国际智慧城市科技股份有限公司 Component operation control method, device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359285A (en) * 2007-08-02 2009-02-04 珠海金山软件股份有限公司 Apparatus and method for inserting control into document
CN101937310A (en) * 2010-09-06 2011-01-05 宇龙计算机通信科技(深圳)有限公司 File copying method and terminal
CN102479103A (en) * 2010-11-23 2012-05-30 金蝶软件(中国)有限公司 Method, device and communication terminal for duplicating information of control
CN103500053A (en) * 2013-09-04 2014-01-08 上海软智信息科技有限公司 Method and device for cross-domain data interaction
CN103902580A (en) * 2012-12-28 2014-07-02 腾讯科技(深圳)有限公司 Method and device for dragging multiple elements in webpage
CN104133828A (en) * 2013-04-30 2014-11-05 奥多比公司 Drag-and-drop clipboard for HTML documents
CN104346465A (en) * 2014-11-07 2015-02-11 北京奇虎科技有限公司 Method and device for saving web page elements, and browser client
CN104615665A (en) * 2015-01-12 2015-05-13 华为技术有限公司 Method and device for display control of information in webpage

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7870502B2 (en) * 2007-05-29 2011-01-11 Microsoft Corporation Retaining style information when copying content
US20090049375A1 (en) * 2007-08-18 2009-02-19 Talario, Llc Selective processing of information from a digital copy of a document for data entry
CN101697156B (en) * 2009-10-29 2016-01-06 孟智平 A kind of method and system of constructing chain web pages
CN103777936B (en) * 2012-10-25 2017-10-31 金蝶软件(中国)有限公司 The implementation method and device of the user variable level view of ERP lists

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101359285A (en) * 2007-08-02 2009-02-04 珠海金山软件股份有限公司 Apparatus and method for inserting control into document
CN101937310A (en) * 2010-09-06 2011-01-05 宇龙计算机通信科技(深圳)有限公司 File copying method and terminal
CN102479103A (en) * 2010-11-23 2012-05-30 金蝶软件(中国)有限公司 Method, device and communication terminal for duplicating information of control
CN103902580A (en) * 2012-12-28 2014-07-02 腾讯科技(深圳)有限公司 Method and device for dragging multiple elements in webpage
CN104133828A (en) * 2013-04-30 2014-11-05 奥多比公司 Drag-and-drop clipboard for HTML documents
CN103500053A (en) * 2013-09-04 2014-01-08 上海软智信息科技有限公司 Method and device for cross-domain data interaction
CN104346465A (en) * 2014-11-07 2015-02-11 北京奇虎科技有限公司 Method and device for saving web page elements, and browser client
CN104615665A (en) * 2015-01-12 2015-05-13 华为技术有限公司 Method and device for display control of information in webpage

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
解决网页无法复制方法的探析;郭慧爽;《电脑开发与应用》;20091031;第22卷(第10期);81-81 *

Also Published As

Publication number Publication date
CN106503009A (en) 2017-03-15
WO2017041632A1 (en) 2017-03-16

Similar Documents

Publication Publication Date Title
CN106503009B (en) Method and device for transferring data in display page
US9871903B2 (en) Mobile computing terminal with more than one lock screen and method of using the same
JP6629697B2 (en) Method and apparatus for extracting a virtual machine image file
US20200104041A1 (en) System for capturing and replaying screen gestures
CN107748740B (en) Code-free sharing of spreadsheet objects
CN104077387B (en) A kind of web page contents display methods and browser device
US9977765B2 (en) Information processing device, information processing method, information processing program, display control device, and display control program
US20140380142A1 (en) Capturing website content through capture services
US10469611B2 (en) Reduced page load time utilizing cache storage
CN110334297A (en) Loading method, terminal, server and the storage medium of terminal page
US20180300351A1 (en) System and Method for Display of Document Comparisons on a Remote Device
US20160316020A1 (en) Web page information presentation method and system
JP2011204158A (en) Terminal apparatus, processing system, processing method and program
CN112657182A (en) Game equipment switching method, device and system and terminal equipment
US10542103B2 (en) Location based multi-device communication
US9984088B1 (en) User driven data pre-fetch
CN106855885B (en) Page processing method of browser and terminal
CN108628900B (en) Data format obtaining method and related device
US20080168087A1 (en) System and Method for Managing Location-Independent Objects
JP4881994B2 (en) Information processing apparatus, content-of-interest determination method, content-of-interest determination program, and information providing system
WO2023005835A1 (en) Icon control method, apparatus, electronic device, and readable storage medium
CN103853327B (en) DATA PROCESSING APPARATUS and operation ACCEPTING METHOD
RU2634221C2 (en) Method and device for drawing presentation of electronic document on screen
CN115221130A (en) File processing system, file processing method and device
JP2017228233A (en) Data analysis system, data analysis method, terminal device and computer program

Legal Events

Date Code Title Description
C06 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