What is the use of Frames objects in JavaScript
This article mainly explains "what is the use of Frames objects in JavaScript". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the use of Frames objects in JavaScript"?
What is the JavaScript Frames object?
If the page uses frames, it produces a frame collection frames, in which numbers are available (starting at 0, left to right, indexed line by line) or name indexing frame.
Objects used in frameset referenc
Window current framework
The top-level framework of top is the browser form
Parent contains the parent frame of the current frame
Self current frame, always equal to window object
?
eight
Frameset rows= "20%, *, 20%" >
Frame src= "http://www.itxueyuan.org/javascript/" name=" top "/ >
Frameset cols= "20%, *" >
Frame src= "http://www.itxueyuan.org/javascript/jiaocheng_1/" name=" left "/ >
Frame src= "http://www.itxueyuan.org/javascript/jiaocheng_2/" name=" right "/ >
/ frameset >
Frame src= "http://www.itxueyuan.org/javascript/php/" name=" bottom "/ >
/ frameset >
The above frame page example produces a frameset.
Window and self represent the same object, but self is to make sure that the frame being used is not parent, but itself, and the top object represents the top-level frame, the browser form itself, so in this case it is equal to the window object, if there is no frame on the page, window,self is equal to top, and the length of the frame collection is 0.
If the page with the frame name right includes the following frames:
What is the JavaScript Frames object?
Frameset cols= "50%, *" >
Frame src= "http://www.itxueyuan.org/javascript/" name=" righttop "/ >
Frame src= "http://www.itxueyuan.org/php/" name=" rightbottom "/ >
/ frameset >
Then the parent parent frame of righttop and rightbottom is right.
At this point, I believe you have a deeper understanding of "what is the use of Frames objects in JavaScript?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!