我有以下嵌入的iframe<IFRAME SRC = “reallylongpage.html#底部”/>不工作
<iframe width="100%" height="400" src="reallylongpage.html" />
reallylongpage.html已2个锚#top返回和#bottom网页
我想我的iframe页面底部加载reallylongpage.html所以我做
<iframe width="100%" height="400" src="reallylongpage.html#bottom" />
但是,这里有两个滚动的iframe和父页的不良影响。父页面不应该滚动。这发生在Chrome和Firefox中。
这里是一个拥有全部代码的例子
parent.html
<html>
<body>
<div style="padding:100 200;">
<iframe WIDTH="100%" HEIGHT="400" SRC="CHILD.HTML#BOTTOM" ></iframe>
</div>
<div>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br>21<br>22<br>23<br>24<br>25<br>26<br>27<br>28<br>29<br>30<br></div>
</body>
</html>
child.html
<html>
<body>
<a name="top" href="#bottom">go to bottom</a><br>
1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br>21<br>22<br>23<br>24<br>25<br>26<br>27<br>28<br>29<br>30<br>
<a name="bottom" href="#top">go to top</a>
</body>
</html>
这是我希望它看起来像
这是我得到的 incorrect http://i33.tinypic.com/2gy0t1x.png
哇,我从来没有注意到这一点。 Google上的每一个链接似乎都没有提供任何解决方案:-O 肯定会喜欢这一个......希望有人更好地了解并且启发我们两个。 – Pandincus 2010-08-06 21:02:07