<frameset>

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

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

¥The <frameset> HTML element is used to contain <frame> elements.

注意:由于现在不鼓励使用框架,而是使用 <iframe>,因此现代网站通常不使用此元素。

¥Note: Because the use of frames is now discouraged in favor of using <iframe>, this element is not typically used by modern websites.

属性

¥Attributes

与所有其他 HTML 元素一样,此元素支持 全局属性

¥Like all other HTML elements, this element supports the global attributes.

cols Deprecated

该属性指定框架集中水平空间的数量和大小。

rows Deprecated

该属性指定框架集中垂直空间的数量和大小。

示例

¥Example

框架集文档

¥A frameset document

框架集文档具有 <frameset> 元素而不是 <body> 元素。<frame> 元素放置在 <frameset> 内。

¥A frameset document has a <frameset> element instead of a <body> element. The <frame> elements are placed within the <frameset>.

html
<!doctype html>
<html lang="en-US">
  <head>
    <!-- Document metadata goes here -->
  </head>
  <frameset cols="50%, 50%">
    <frame
      src="https://web.nodejs.cn/en-US/docs/Web/HTML/Element/iframe" />
    <frame
      src="https://web.nodejs.cn/en-US/docs/Web/HTML/Element/frame" />
  </frameset>
</html>

如果要将另一个 HTML 页面嵌入到文档的 <body> 中,请使用 <iframe> 元素。

¥If you want to embed another HTML page into the <body> of a document, use an <iframe> element.

规范

Specification
HTML Standard
# frameset

¥Specifications

浏览器兼容性

BCD tables only load in the browser

¥Browser compatibility

也可以看看

¥See also