What is window framing? Window framing is to divide a browser document window into multiple windows. Each window can display an independent web page file, and each frame (i.e. page) has its own URL. How to create a frame window? Frames are usually created using the and tags. But in HTML 4, the tag can also be used to create "inline frames" within the document. As far as JavaScript is concerned, creates the same frame as and . In HTML, use (split window tag) to split the window. The status of in a multi-window page is equivalent to the status of in an ordinary single-window page. In the page Use ... to mark the starting and ending positions of the main part of the page. Furthermore, the tag determines how the windows are divided, as well as the position and size of each window. Its basic grammatical structure is as follows: Copy after login cols and rows: are the two parameters that determine how the page is divided. Use cols to split the left and right windows, and the left and right width of each frame is expressed as a percentage of the window width. For example: cols="30%,40%,*" means that it is divided into three windows in the horizontal direction, and the percentages of the total width of each are 30%, 40% and 30%. Among them, "*" represents the remaining part, that is to say, the width of the small window corresponding to "*" is the remaining width. Use rows to split the upper and lower windows, and also use the percentage setting method. frameborder: specifies whether each sub-window (ye) should add a border (no); if a frame is added, use the border parameter to specify the width of the border, and bordercolor to specify the color of the border. framespacing: is used to set the spacing between sub-windows. The default value is 0. After dividing the window using the tag, the attributes of each window are defined using the HTML tag, so the tag must contain the tag for definition Properties of each sub-window. Its syntax is as follows: Copy after login align: Set the position of the sub-window to the left (left), right (right), center (center), top (top) or bottom (bottom). name: is used to specify the name of the sub-window, and src is used to specify the HTML page address corresponding to the sub-window. noresize: is for the user. When the tag contains this parameter, the user cannot use the mouse to adjust or modify the size of each window. scrolling: Set whether the sub-window requires scroll bars. When scrolling=no, scroll bars are not required. When scrolling=yes, scroll bars are required. When scrolling=auoto, scroll bars are automatically set according to the actual situation. frameborder and bordercolor: is used to set the border and border color of the sub-window. But the object is limited to sub-windows marked with . marginheight and marginwidth: are used to set the width of the upper and lower edges and the left and right edges of the sub-window respectively. For example: Copy after login What is the relationship between frame windows in JavaScript? Any frame of a window can reference other frames through the top, frames and parent attributes. JavaScript code within any window or frame can reference its own window or frame as window or self. Each window has frames attribute. This property refers to an array of Window objects, where each element represents a frame contained in this window (if a window does not have any frames, then the frames[] array is empty and frames.length is 0). In this way, the window You can use frames[0] to reference its first frame, frames[1] to reference its second frame, and so on. Each window also contains a parent attribute, which refers to the Window object containing this window. This way, the first frame in the window can reference its sibling frames, i.e.: parent.frames[1]Copy after login If a window is a top-level window rather than a frame, then the parent attribute refers to the window itself: parent==self;Copy after login If a frame is contained within another frame, which is contained within a top-level window, then the frame can use parent.parent to reference the top-level window. Note: Frames cannot coexist with body tags and content Framing is not conducive to search engine optimization. It is not recommended to use framing on normal front-end pages. The above is the entire content of this article. I hope it will be helpful to everyone in learning javascript programming.