此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in English Always switch to English

<frameset>

Deprecated

Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.

<frameset> HTML 元素用於包含 <frame> 元素。

備註:由於現在不鼓勵使用頁框,而更推薦使用 <iframe>,因此現代網站通常不會使用此元素。

屬性

與所有其他 HTML 元素一樣,此元素支援全域屬性

cols

此屬性指定頁框集中水平空間的數量和大小。

rows

此屬性指定頁框集中垂直空間的數量和大小。

範例

頁框集文件

頁框集文件使用 <frameset> 元素而不是 <body> 元素。 <frame> 元素放置在 <frameset> 內。

html
<!doctype html>
<html lang="zh-TW">
  <head>
    <!-- Document metadata goes here -->
  </head>
  <frameset cols="50%, 50%">
    <frame
      src="https://developer.mozilla.org/zh-TW/docs/Web/HTML/Element/iframe" />
    <frame
      src="https://developer.mozilla.org/zh-TW/docs/Web/HTML/Element/frame" />
  </frameset>
</html>

如果你想要將另一個 HTML 頁面嵌入到文檔的 <body> 中,請使用 <iframe> 元素。

規範

Specification
HTML
# frameset

瀏覽器相容性

參見