最简单的 iframe 使用方法
文章目录
1、iframeTest.html
重点:<a href="2.html" target="i">中的target属性
一定要等于 <iframe src="" id="iframe1Id" name="i" width="100%"></iframe> 中的name中的属性
的name
<html>
<head>
<title>iframe test</title>
</head>
<body>
<div><iframe src="" id="iframe1Id" name="i" width="100%"></iframe></div>
<a href="2.html" target="i"> 点击 </a> <!--在div中显示2.html中的内容-->
</body>
</html>
2、2.html
<html>
<head>
<title>iframe test</title>
</head>
<body>
this is 2.html
</body>
</html>
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论