Obsolete: 框架標籤已經在 HTML 5 廢置。
| 起始標籤 | 結束標籤 |
|---|---|
| 需要 | 需要 |
<frameset> 有幾個屬性
| 屬性 | 值 | Deprecated or Obsolete |
|---|---|---|
| rows | 垂直分隔模式 | |
| cols | 水平分隔模式 |
<frame> 有幾個屬性
| 屬性 | 值 | Deprecated or Obsolete |
|---|---|---|
| name | ||
| longdesc | ||
| src | ||
| noresize | ||
| scrolling | auto yes no | |
| frameborder | 1 0 | |
| marginwidth | pixels | |
| marginheight | pixels |
使用框架就是以 <frameset> 取代 <body> , <frameset> 中需以 rows 或 cols 屬性 (attribute) 決定分隔模式,通常以百分比或畫素為單位。舉例如下
<html>
<head>
<title>網頁標題</title>
</head>
<frameset cols="20%,*">
<frame src="demo01.html" name="1">
<frame src="demo02.html" name="2">
</frameset>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:frameexample01.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->利用瀏覽器 (broswer) 開啟,結果如下

網頁被切割成左右兩半,左邊佔 20% ,右邊設定成星號,表示餘下的 80% 。每一個部份都需要 <frame> 標籤 (tag) 指定來源網頁檔案,此例中,第一個 <frame> 為 demo01.html ,如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
demo01
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:body01.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->第二個 <frame> 為 demo02.html ,如下
<html>
<head>
<title>網頁標題</title>
</head>
<body>
demo02
</body>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:body02.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->至於 <noframes> 元素 (element) 為找不到 <frame> 中 src 的網頁檔案,框架網頁另行顯示的內容,例如
<html>
<head>
<title>網頁標題</title>
</head>
<frameset cols="20%,*">
<frame src="demo03.html">
<frame src="demo04.html">
<noframes>
網頁載入發生錯誤....
</noframes>
</frameset>
</html>
<!-- 《程式語言教學誌》的範例程式
http://pydoing.blogspot.com/
檔名:frameexample02.html
功能:示範 HTML 4.01 標記語言的使用
作者:張凱慶
時間:西元 2011 年 5 月 -->可是目前 Firefox 之類的主流瀏覽器已無支援這個標籤

| 中英文術語對照 | |
|---|---|
| 屬性 | attribute |
| 瀏覽器 | broswer |
| 標籤 | tag |
| 元素 | element |
您可以繼續參考
相關目錄
HTML 4.01 快速導覽 - 目錄
HTML, CSS 教材
首頁
參考資料
沒有留言:
張貼留言