Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!

Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

Summary

<frame> is an HTML element which defines a particular area in which another HTML document can be displayed. A frame should be used within a <frameset>.

Using the <frame> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers. Instead of the <frame> element, <iframe> may be preferred.

Attributes

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

src
This attribute is specify document which will be displayed by frame.
name
This attribute is used to labeling frames. Without labeling all links will open in the frame that they are in.
noresize
This attribute avoid resizing of frames by users.
scrolling
This attribute defines existence of scrollbar. If this attribute is not used, browser put a scrollbar when necessary. There are two choices; "yes" for showing a scrollbar even when it is not necessary and "no" for do not showing a scrollbar even when it is necessary.
marginheight
This attribute defines how tall the margin between frames will be.
marginwidth
This attribute defines how wide the margin between frames will be.
frameborder
This attribute allows you to put borders for frames.

Example

<frameset cols="50%,50%">
  <frame src="https://developer.mozilla.org/en/HTML/Element/iframe" />
  <frame src="https://developer.mozilla.org/en/HTML/Element/frame" />
</frameset>

See also

文档标签和贡献者

 此页面的贡献者: Jeremie, kscarfone, alispivak, tregagnon, Sheppy, ethertank, avsaro, jswisher
 最后编辑者: Jeremie,