fs框架用例一共有三个html文件
1、problem5-frameset-index.html // 框架首页
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Frameset</title>
</head>
<!--将窗口竖着平分成两个页面。该页面的作用就是指定使用frameset框架,以及fs框架窗口怎么划分-->
<frameset cols="10%,90%">
<frame src="problem5-menu.html"/>
<frame src="problem5-rightpart.html" name="framename" />
<!-- name="framename" : 将第二个空白页面设为显示菜单指定的链接的页面-->
</frameset>
</html>
2、problem5-menu.html // 菜单页面
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTML作业第五题</title>
<style>
</style>
</head>
<body>
<div id="wrap">
<div id="head"><a id="menu">frameset导航栏</div>
</br>
<!-- target="framename" : 表示这个导航栏菜单的页面放到frameset框架划分的哪一块中 -->
<p><a id="baidu" target="framename" href="https://www.baidu.com">百度</a></p>
</br>
<p><a id="wangyin" target="framename" href="https://www.163.com">网易</a>
</p>
</br>
<p><a id="tengxun" target="framename" href="http://www.qq.com">腾讯</a>
</p>
</div>
</body>
</html>
3、problem5-rightpart.html // fs框架划分的某一块(这是右半块)
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>只包含前言的页面,用于problem5页面在框架右部分显示。</title>
</head>
<body style="background-color:gray;">
<div>frameset的右半边页面的首页,点击菜单栏之后,菜单链接的页面会替代该首页</div>
</body>
</html>
网友评论