Correspondence device and method of webpage and document object model (DOM)
A document object model and web page technology, applied in the computer field, can solve the problems of complex system and low programming efficiency, and achieve the effect of simple web page structure and improved flexibility
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0054] An embodiment of the present invention proposes a device corresponding to a web page and a document object model, including:
[0055]The document object model module 1 is used to store the content of each frame in the page and the corresponding absolute position of each frame.
[0056] In the embodiment of the present invention, the content of each frame is stored in the document object model module, and the absolute position corresponding to each frame in the page is stored, so as to realize a one-to-one correspondence between the content and each frame in the page of the Portal layout. Compared with the way in which the DOM in the prior art adopts the correspondence between the document and the row and column where the frame is located, this method can realize that only the absolute position parameter stored in each frame in the DOM needs to be changed when the frame is moved. The embodiment of the present invention can realize that when dragging the frame body in the...
Embodiment 2
[0058] The second embodiment of the present invention proposes a device corresponding to a web page and a document object model, the structure of which is as follows figure 1 shown, including:
[0059] The document object model module 1 is used to store the content of each frame in the page and the corresponding absolute position of each frame;
[0060] The absolute position calculation module 2 is used to obtain the width and height of each frame, and calculate the absolute pixel position of each frame in the page according to the width and height of each frame in the page;
[0061] The position change calculation module 3 is configured to obtain a new absolute position of the frame according to the position change of the frame, and change the absolute pixel position corresponding to each frame in the document object model module according to the new absolute position.
[0062] In the second embodiment of the present invention, an absolute position calculation module 2 and / o...
Embodiment 3
[0096] The third embodiment of the present invention proposes a method for corresponding a web page and a document object model, including:
[0097] A corresponding relationship is established between each frame in the page and the corresponding entry of the document object model through the absolute position of the frame in the page.
[0098] In the embodiment of the present invention, in the document object model, through the absolute position of each frame in the page, a corresponding relationship is established between the frame in the page and the content of each corresponding frame in the DOM, so as to One-to-one correspondence between the content and each box in the page of the Portal layout. Compared with the way in which the DOM in the prior art adopts the correspondence between the document and the row and column where the frame is located, this method can realize that only the absolute position parameter stored in each frame in the DOM needs to be changed when the f...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


