html表單——使用frameset寫一個導航欄效果


主頁面:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<!--frameset   
		說明:1、frameset不能潛入在body標簽里面,只能嵌入在html標簽里面-
			 2、一個html頁面中不能同時嵌入多個frameset標簽
			 3、若有多個frame標簽,且同時未設置src屬性值,則設置任何一個src屬性,其他src屬性也默認為該屬性
	->
<!--	<frameset cols="200px,20%,*">
		<frame src="#"/><frame src="#"/><frame src="#"/>
	</frameset>-->
	
	<!--
		frameborder="0“ :用來設置不顯示分隔條
		noresize="noresize"   :則設置分隔條不可拖動
		scrolling="no"    :不顯示滾動條     (要么所有的frame都設置scrolling屬性,要么最后一個frame標簽設置scrolling屬性)
	-->
<!--	<frameset rows="200px,20%,*" frameborder="1" noresize="noresize"  >		
		<frame src="http://dict.youdao.com/w/Frame/#keyfrom=dict2.top" />
		<frame src="http://dict.youdao.com/w/Frame/#keyfrom=dict2.top"  scrolling="no"/>
		<frame src="http://dict.youdao.com/w/Frame/#keyfrom=dict2.top" />
	</frameset>-->
	
	<!--左邊是頁面導航欄,右邊是導航欄對應的內容-->
	<frameset cols="200px,*" frameborder="1" noresize="noresize"  >		
		<frame src="navigationbar.html" />
		<frame src="http://www.baidu.com" name="bodyContent"/>
	</frameset>
</html>

  

導航頁面:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>navigationbar.html</title>
	</head>
	<body>
		<a href="http://www.baidu.com" target="bodyContent" >百度</a><br/><br/>
		<a href="http://www.sina.com.cn/" target="bodyContent" >新浪</a><br/><br/>
		<a href="http://dict.youdao.com/" target="bodyContent" >有道詞典</a><br/><br/>
		<a href="https://ssl.zc.qq.com/chs/index.html?type=1" target="bodyContent" >QQ郵箱注冊</a><br/><br/>
	</body>
	
</html>

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM