<noframes>: The Frame Fallback element

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.

<noframes> HTML 元素提供要在不支持(或已禁用支持)<frame> 元素的浏览器中呈现的内容。尽管大多数常用浏览器都支持框架,但也有例外,包括某些特殊用途的浏览器(包括一些移动浏览器)以及文本模式浏览器。

¥The <noframes> HTML element provides content to be presented in browsers that don't support (or have disabled support for) the <frame> element. 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.

<noframes> 元素可以包含 HTML 文档正文中允许的任何 HTML 元素(<frameset><frame> 元素除外),因为在不支持框架时使用框架是没有意义的。

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

<noframes> 可用于显示一条消息,解释用户的浏览器不支持框架,但理想情况下应用于显示不使用框架但仍提供相同或相似功能的网站的替代形式。

¥<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.

注意:该元素已过时,不应使用,因为 <frame><frameset> 元素也已过时。当确实需要框架时,应使用 <iframe> 元素来呈现它们。

¥Note: This element 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> element.

属性

¥Attributes

与所有其他 HTML 元素一样,此元素支持 全局属性。它没有其他可用的属性。

¥Like all other HTML elements, this element supports the global attributes. It has no other attributes available.

示例

¥Example

在此示例中,我们看到一个包含两个框架的框架集。此外,如果 user agent 不支持帧,则 <noframes> 用于显示解释性消息。

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

html
<!doctype html>
<html lang="en-US">
  <head>
    <!-- Document metadata goes here -->
  </head>
  <frameset rows="45%, 55%">
    <frame src="https://web.nodejs.cn/en/HTML/Element/frameset" />
    <frame src="https://web.nodejs.cn/en/HTML/Element/frame" />
    <noframes>
      <p>
        It seems your browser does not support frames or is configured to not
        allow them.
      </p>
    </noframes>
  </frameset>
</html>

规范

Specification
HTML Standard
# noframes

¥Specifications

浏览器兼容性

BCD tables only load in the browser

¥Browser compatibility

也可以看看

¥See also