1. Why use multiple windows ??
The HTML file designed with the frames structure can divide the entire window into several independent small windows, each of which can load different files separately. Fortunately, each window can communicate with each other.
Ii. Multiple windows
(1). Basic Structure
<Frameset>
<Frame src = "url">
<Frame src = "url">
...
</Frameset>
(2). Window Size settings
We split the window into several parts, horizontally using the rows attribute, and vertically using the Cols attribute. The size of each part can be achieved by the values of these two attributes.
<Frameset Cols = #> example: <frameset Cols = "100,200,300">
<Frameset rows = #> example: <frameset rows = "10%, 20%, 70%">
# The value is a pair of strings enclosed by quotation marks. The numbers in the string represent the size of each split window. The numbers are separated by commas (,). A few numbers indicate several windows. Of course, any number can also be replaced by "*", which means that the browser will automatically set its size.
(3). Arrange the window
Vertically arrange multiple Windows:
********************************
<Frameset Cols = 30%, 20%, 50%>
<Frame src = "frame/a.html">
<Frame src = "frame/B .html">
<Frame src = "frame/c.html">
</Frameset>
Arrange multiple Windows horizontally:
********************************
<Frameset rows = 25%, 25%, 50%>
<Frame src = "frame/a.html">
<Frame src = "frame/B .html">
<Frame src = "frame/c.html">
</Frameset>
Arrange multiple Windows horizontally:
********************************
<Frameset Cols = 20%, *>
<Frame src = "frame/a.html">
<Frameset rows = 40%, *>
<Frame src = "frame/B .html">
<Frame src = "frame/c.html">
</Frameset>
</Frameset>
(4) Cooperation between various windows
The content of several windows separated by frames is not static. The content of one window changes with the requirements of another window, which improves the value of frames. To complete mutual operations between windows, we must name each window, which is defined by the attribute name.
Window identifier (frame name)
<Frame src = URL name = "window name"> example: <frame src = "frame/a.html" name = "Left">
The window name is defined, and the target attribute specifies the window in which the linked file appears. The target value can be the name defined by name or the following four types of values:
<A href = URL target = _ blank> a new window is displayed.
<A href = URL target = _ Self> displayed in the same window
<A href = URL target = _ parent> display in the window of the previous file in frameset
<A href = URL target = _ top> displayed in the entire browser window
(5). Other attributes
<Frame frameborder #>#= yes, no |
Border settings for each window. Yes indicates a border, and no indicates no border. |
<Frame marginwidth = # marginheight = #> # The value is a pixel. |
Set the width of the upper, lower, and left border of each window. If it is not set, it is automatically determined by the browser. |
<Frame scrolling =#>#= yes, no, auto |
Scroll bar setting. Yes indicates yes, no indicates no, and auto indicates automatic setting by the browser. # = the default value is auto. |
<Frame noresize> |
The noresize attribute is used to set unchangeable borders. |