【发布时间】:2017-11-22 11:56:31
【问题描述】:
我正在尝试运行以下代码,以便每当我单击链接时,相应的页面都会显示在 iframe 中。我正在尝试覆盖iframes,但代码似乎没有按预期工作。
<iframe name="IFrame1" style="width: 200px; height: 200px; display: block;position: relative;" src="https://www.link1.com"></iframe>
<iframe name="IFrame2" style="width: 200px; height: 200px; top: 10px;left: 10px;display:block;position: absolute;" src="http://www.link2.com"></iframe>
<p><a href="https://www.link1.com" target="IFrame1">link1</a></p>
<p><a href="http://www.link2.com" target="IFrame2">link2</a></p>
请帮助我克服它。
【问题讨论】: