[html] <iframe>标签使用 iframe&target的三种表现
文章目录
1、target == iframe.name,点击p标签,在iframe中展示新页面。
<iframe src="demo_iframe.htm" name="iframe_a" height="300px" width="100%" title="Iframe Example"></iframe>
<p>W3Schools.com</p>
2、target != iframe.name,点击p标签,在新标签页中打开新页面
<iframe src="demo_iframe.htm" name="iframe_a" height="300px" width="100%" title="Iframe Example"></iframe>
<p>W3Schools.com</p>
3、target 不存在,在当前标签页中打开新页面。
<iframe src="demo_iframe.htm" name="iframe_a" height="300px" width="100%" title="Iframe Example"></iframe>
<p>W3Schools.com</p>
建议去w3schools的线上环境尝试一下
https://www.w3schools.com/htm...
同步更新到自己的语雀
https://www.yuque.com/diracke...
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论