HTML中的两列窗口关联

效果:页面分为左右两个部分,在左边点击链接时,显示在右边,实现方法有两种:

方法一:frameset 和 iframe

<frameset cols="25%,*" border="1">

<frame src="homework/聚美优品常见问题/test1.html" >

<iframe src="../我的第一个页面.html" scrolling="no" name="hehe" width="100%"></iframe>

</frame>

<frame src="../我的第一个页面.html" name="hehe"/>

</frameset>

 

:在homework/聚美优品常见问题/test1.html中写上:

<a href="../电子产品调查表.html" target="hehe">测试iframe</a>

<a href="../../../test3.html" target="hehe">测试iframe2</a>

这样就可以在点击左边的【测试ifame】或者【测试iframe2】,就能在右边的部分看到相应的链接。


方法二:超链接

<frameset cols="25%,*" border="1">
<frame src="../我的第一个页面.html"/>

<frame src="homework/聚美优品常见问题/test1.html" name="rh" />
</frameset>

注意:在../我的第一个页面.html中添加

<a href="1-onclass/homework/滚筒洗衣机排行榜/test.html" target="rh">洗衣机排行榜</a>
<a href="1-onclass/homework/网易邮箱注册/表头.html" target="rh">表头排行榜</a>

这样就可以在左边点击【洗衣机排行榜】或者【表头排行榜】就可以在右边显示对应的链接。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值