The key code to insert the embedded page is
<iframe align=middle marginwidth=0 marginheight=0 src="http://www.hao123.com" frameborder=0 width=660 height="800" scrolling=no vspace=-200 ></iframe>
http://www.hao123.com is the file name of the embedded page. Don’t forget to upload this page. The tag < Iframe > plays a very important role. When a window is opened at a specified position on the web page, the width of the window is the value of "width", and the height of the window is the value of "height". Generally, it should be consistent with the size of the cell where it is located. The tag < Iframe > also has some available parameter settings as follows:
Marginwidth: The reserved width of the content in the web page on the right side of the table; for example: marginwidth="20", the unit is pix, the same below.
Marginheight: The height reserved for the content in the web page at the top of the table;
hspace: The abscissa of the upper right corner of the web page;
vspace: The ordinate of the upper right corner of the web page;
Frameborder: Whether to display the edge, Fill in "1" to represent "yes", fill in "0" to represent "no", the default value is "1";
Scrolling: whether the scroll bar appears, fill in "1" to represent "yes", fill in "0" to represent "" No", the default value is "1";
This vspace=-200 is the key attribute,
Use iframe to call the specified part of the web page2010-10-25 22:38
Currently, there is no way to control by coordinates. The only way is to press the top and left , to control by running on the right, so you need to create a file to completely call the content of the target web page, and then use the iframe code to call where the specified content needs to be called.
First create a file that completely calls the target web page, named files.html, the code is as follows:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> </head> <body> <iframe src="目标网址" width="980" height="700" frameborder="0" scrolling="no" style="position: absolute; top: -120px; left: -680px;"></iframe> </body> </html>
This page uses the iframe frame to reference the target page, and uses CSS positioning to set the frame floating position ( top: -120px; left: -680px). Of course, you can also control it by the right margin, such as right:680px. The distance can be adjusted according to the situation until it is adjusted to the appropriate position.
Then put the following code in the appropriate location in the file where the target content needs to be called:
<iframe src="files.html" width="300" height="230" frameborder="0" scrolling="no"></iframe>
The height and width can be adjusted according to the situation. In order to make the called content normal, The position we set is displayed correctly. You can modify the margin control in files.html to achieve the best effect
The above is the detailed content of Example code sharing on how to specify the nesting of web page locations in the Iframe framework. For more information, please follow other related articles on the PHP Chinese website!