Using Frame, you can display multiple web pages in the browser window at the same time. A web page is set in each Frame, and the web pages in each Frame are independent of each other.
Determines how to divide the Frame.has cols attributes and rows attributes. Use the cols attribute to distribute the Frame by columns; use the rows attribute to distribute the Frame by rows.
Use thetag to set the web page. There is a src attribute in, and the src value is the path and file name of the web page.
The purpose of the following code is to divide the Frameset into 2 columns. The first column is 25%, which means the width of the first column is 25% of the window width; the second column is 75%, which means the width of the first column. is 75% of the window width. a.html is displayed in the first column and b.html is displayed in the second column.
Iframe means Inline Frame. Useto place the Frame within an HTML file.
This example shows how to display three web pages at the same time in the browser. The three web pages are distributed in columns.
This example shows how to display three web pages at the same time in the browser. The three web pages are distributed in rows.
Mixed Frameset
This example uses both the cols attribute and the rows attribute to flexibly distribute the Frame.
The noresize attribute in Frameset
Use the Noresize attribute to ensure the size of the Frame. If the noresize attribute is not used, you can use the mouse to move the border of the Frame to change the size of the Frame. If the noresize attribute is set, the border cannot be moved.
Frame for navigation
This example demonstrates how to create a Frame for navigation. This navigation Frame contains an HTML, and this HTML (code below) contains a list of web pages. Click on any item in the web page list, and the clicked web page will be displayed in the second Frame.
Usage of Iframe
用 IFRAME 可以在HTML文件里显示另一个网页。
这个 HTML 文档中使用 IFRAME 来显示另外一个叫Frame_a.html 的网页。
This example shows how to use iframe to embed a web page in an HTML file.
The above is the detailed content of What is the use of introducing HTML frames (Frames)?. For more information, please follow other related articles on the PHP Chinese website!