过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The obsolete HTML No Frames or frame fallback element, <noframes> , provides content to be presented in browsers that don't support (or have disabled support for) the <frame> 元素。 Although most commonly-used browsers support frames, there are exceptions, including certain special-use browsers including some mobile browsers, as well as text-mode browsers.

A <noframes> element can contain any HTML elements that are allowed within the body of an HTML document, with the exception of the <frameset> and <frame> elements, since using frames when they aren't supported doesn't make sense.

<noframes> can be used to present a message explaining that the user's browser doesn't support frames, but ideally should be used to present an alternate form of the site that doesn't use frames but still offers the same or similar functionality.

In HTML 5 and later, <noframes> is obsolete and shouldn't be used, since the <frame> and <frameset> elements are also obsolete. When frames are needed at all, they should be presented using the <iframe> 元素。

属性

Like all other HTML elements, this element supports the 全局属性 . It has no other attributes available.

范例

In this example, we see a frameset with two frames. In addition, <noframes> is used to present an explanatory message if the 用户代理 doesn't support frames.

<frameset cols="50%,50%">
  <frame src="https://developer.mozilla.org/en/HTML/Element/frameset" />
  <frame src="https://developer.mozilla.org/en/HTML/Element/frame" />
  <noframes><p>It seems your browser does not support frames or is
  configured to not allow them.</p></noframes>
</frameset>
					

规范

规范 状态 注释
HTML5
The definition of 'noframes' in that specification.
推荐
HTML 4.01 Specification
The definition of '<noframes>' in that specification.
推荐

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
noframes 弃用 非标 Chrome 完整支持 Yes Edge 完整支持 12 Firefox 完整支持 Yes IE 完整支持 Yes Opera 完整支持 Yes Safari 完整支持 Yes WebView Android 完整支持 Yes Chrome Android 完整支持 Yes Firefox Android 完整支持 Yes Opera Android 完整支持 Yes Safari iOS 完整支持 Yes Samsung Internet Android 完整支持 Yes

图例

完整支持

完整支持

非标。预期跨浏览器支持较差。

非标。预期跨浏览器支持较差。

弃用。不要用于新网站。

弃用。不要用于新网站。

另请参阅

元数据

  • 最后修改: