当前位置: 代码迷 >> ASP.NET >> 至于iframe 的锚连接 大家帮帮忙啊
  详细解决方案

至于iframe 的锚连接 大家帮帮忙啊

热度:7952   发布时间:2013-02-26 00:00:00.0
关于iframe 的锚连接 大家帮帮忙啊
有一个页面   头部是用iframe   top.aspx             尾部是用iframe   bot.aspx     做的


然后我想做一个锚


在to.aspx文件里 <a   href= "#tj "> 其它说明 </a> ,
bot.aspx文件里 <a   name= "tj "> </a> ,当点击top.aspx中的文件说明时候自动指向bot.aspx文件里的 <a   name= "tj "> </a> ,这个地方


请问该如何做呢啊   ,谢谢大家


------解决方案--------------------------------------------------------
给底部的IFrame 起个名字 <iframe src=... name= "FrmBottom "..

<a href= "bot.aspx#tj " target=FrmBottom > 其它说明 </a>

试试吧,应该可以
------解决方案--------------------------------------------------------
锚点是用在一个页面上的,不同文件间没有作用,

不过结合 JS 应该可以实现!俺去试试看,稍后回来!
------解决方案--------------------------------------------------------
我试过了可以
aa.htm
<table width= "100% "
<tr>
<td height= "900 "> <iframe src= "1.htm " width= "100% " height= "200 "> </iframe> </td>
</tr>
<tr>
<td> <iframe Name= "FrmBottom " height= "200 " src= "b.Htm " width= "100% "> </iframe> </td>
</tr>
</table>

/////////
1.htm
<a href= "b.htm#tj " target=FrmBottom > 其它说明 </a>
/////

<a Name= "tj "> asdfas </a>

打开aa.htm 点击其他说明。。

------解决方案--------------------------------------------------------
zzfloat(方舟) 方法好,原来和 frame 里是一样的!

  相关解决方案