<p>这段代码的错误在于iframe的src属性值设置为了&quot;index.hmtl&quot;,而应该是&quot;index.html&quot;。所以代码应该改为:<iframe name="my-iframe" src="index.html" frameborder="0" style="width:100%; height:100%;"></iframe>。</p>
<p>至于为什么会出现两个index.html页面,可能是因为iframe标签的src属性值设置为了index.html,而在按钮组中的每个按钮也有一个href属性指向index.html,并且目标是iframe。这样点击按钮时会导致iframe中加载了index.html页面,从而出现了两个页面。要解决这个问题,可以将按钮中的href属性值改为其他页面的链接。比如将Dashboard按钮的href属性值改为&quot;dashboard.html&quot;,Checkout Zones按钮的href属性值改为&quot;zone.html&quot;,以此类推。这样点击按钮时,iframe中加载的就是对应的页面,不会再出现两个index.html页面。</p>
下面的代码哪里出错了我加了iframe name=my-iframe src=indexhmtl frameborder=0 style=width100; height100;iframe会出现两个indexhtml的页面应该怎么该!DOCTYPE htmlhtml	head		meta charset=utf-8		link rel=stylesheet href=stylecss		link

原文地址: https://www.cveoy.top/t/topic/inrX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录