HTML - <noframes> 標籤



HTML <noframes> 標籤用於處理不支援 <frame> 標籤的瀏覽器。此標籤用於顯示備用文字訊息。

此標籤不再推薦,因為它已棄用且在 HTML5 中不受支援。

語法

<noframes> .. </noframes>

屬性

HTML noframes 標籤支援 HTML 的 全域性 屬性。

以下示例將說明 noframes 標籤的用法。何時以及如何使用 noframes 標籤,以及何時瀏覽器不支援 frame 標籤。

HTML noframes 標籤示例

以下示例將說明 noframes 標籤的用法。何時以及如何使用 noframes 標籤,以及何時瀏覽器不支援 frames 標籤。

如果框架失敗則顯示備用內容

考慮以下示例,我們將使用文字形式的備用內容放在 <nofarmes> 標籤中,如果瀏覽器不支援 frame 標籤。

<!DOCTYPE html>
<html>
<head>
   <title>HTML noframes Tag</title>
</head>
<frameset cols="200, *">
   <frame src=
"https://tutorialspoint.tw/cg/images/logo.png" />
   <frame src=
"https://tutorialspoint.tw/static/images/hero.png" />
   <noframes>
      <body> 
         Your browser does not support frames.
      </body>
   </noframes>
</frameset>
</html>

如果嵌入失敗則顯示備用影像

考慮以下示例,我們將使用備用影像放在 <onframes> 標籤中,如果瀏覽器不支援 frame 標籤。

<!DOCTYPE html>
<html>

<head>
    <title>HTML noframes Tag</title>
</head>
<frameset cols="200, *">
    <frame src=
"https://tutorialspoint.tw/cg/images/logo.png"/>
    <frame src=
"https://tutorialspoint.tw/static/images/hero.png"/>
    <noframes>

        <body>
            <img src=
"https://tutorialspoint.tw/cg/images/logo.png"/>
            <img src=
"https://tutorialspoint.tw/static/images/hero.png"/>
        </body>
    </noframes>
</frameset>

</html>

支援的瀏覽器

標籤 Chrome Edge Firefox Safari Opera
noframes 是 1.0 是 12.0 是 1.0 是 4.0 是 15.0
html_tags_reference.htm
廣告

© . All rights reserved.