【html】点击链接让页面在 iframe 中变换

 

Demo:

<html><body> 


<a href= "1.html " target= "iFrameName "> page1 </a> <br/> 
<a href= "2.html " target= "iFrameName "> page2 </a> <br/> 
<a href= "3.html " target= "iFrameName "> page3 </a> <br/> 
<a href= "4.html " target= "iFrameName  "> page4 </a> <br/> 


<div id= "iFrame1 " style= "position:absolute; left:220px; top:200px; z-index:18 "> 
<iframe name= "iFrameName " width=542 height=615 src= "1.html " scrolling= "auto " frameborder= "0 "> </iframe> 
</div> 

 

</body> </html>

主要是在iframe里定义name=XXX ,然后在href里用 target调target=XXX

posted @ 2017-08-27 11:18  蓿苜  阅读(1687)  评论(0编辑  收藏  举报