English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The <frameset> is an HTML element used to contain <frame>. Note: Nowadays, it is not encouraged to use frame, instead, use <iframe>. Most websites today do not use frame.
Simple three-frame page:
<!DOCTYPE html> <html> <frameset cols="25%,*,25%"> <frame src="sun.html"> <frame src="venus.html"> <frame src="mercur.html"> </frameset> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <frameset> tag
HTML5 does not support the <frameset> tag.
The <frameset> tag defines a frame set.
The <frameset> element is used to organize one or more <frame> Elements. Each <frame> has its own independent document.
The <frameset> element specifies how many columns or rows are present in the frame set, as well as the percentage/pixels occupied by each row and column.
Note:If you want to validate a page that contains frames, make sure <!DOCTYPE> Set to "HTML Frameset DTD" or "XHTML Frameset DTD".
Attributo | Valore | Descrizione |
---|---|---|
cols | pixels % * | Not supported in HTML5.Specifies the number of columns and dimensions in the frame set. |
rows | pixels % * | Not supported in HTML5.Specifies the number of rows and dimensions of the frame set. |
In HTML 4.01, the <frameset> tag supports the following standard attributes:
Attributo | Valore | Descrizione |
---|---|---|
class | classname | Definisce il nome della classe dell'elemento |
id | id | Definisce l'id univoco dell'elemento |
style | style_definition | Definisce lo stile inline dell'elemento |
title | text | Definisce informazioni aggiuntive per l'elemento |
Per una descrizione completa, visitaAttributi standard.
Nell'HTML 4.01, l'etichetta <frameset> supporta i seguenti attributi di evento:
Attributo | Valore | Descrizione |
---|---|---|
onload | script | Esegui lo script quando il documento viene caricato |
onunload | script | Esegui lo script quando il documento viene rimosso |
Per una descrizione completa, visitaAttributi di evento.
Frame orizzontale
Questo esempio dimostra come creare un frame orizzontale utilizzando tre documenti diversi.
Struttura di frame mista
Questo esempio dimostra come creare una struttura di frame con tre documenti, mescolandoli in righe e colonne.
Struttura di frame con attributo noresize="noresize"
Questa esempio dimostra l'attributo noresize. In questo esempio, i frame non sono dimensionabili. Trascinando il mouse sui bordi tra i frame, noterai che i bordi non possono essere spostati.
Manuale di riferimento HTML DOM: Oggetto Frameset