通过iframe能够实现的功能是在网页中嵌套别的网页
代码展示:
- iframeA
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body bgcolor="#808080" >
iframeA<br />
<a href="https://www.csdn.net/" target="_parent">点击跳转csdn</a>
</body>
</html>
- iframeB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body bgcolor="#FF0000" >
iframeB <br>
<iframe src="iframeA.html" width="700px" height="400px" frameborder="0"></iframe>
</body>
</html>
- iframeC
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body bgcolor="#008000">
iframeC<br />
<iframe src="iframeB.html" width="800px" height="600px" frameborder="0"></iframe>
</body>
</html>
- index
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>框架</title>
</head>
<body>
<iframe src="iframeC.html" width="1000px" height="700px" frameborder="o"></iframe>
</body>
</html>
实现的效果: