--- title: iframe slug: Mozilla/Tech/XUL/iframe tags: - Dokumentacja_XUL - Elementy_XUL translation_of: Archive/Mozilla/XUL/iframe ---
Wewnętrzna ramka, która działa bardzo podobnie do elementu iframe z języka HTML. Atrybut src służy do określenia zawartości ramki. Treść ta stanowi osobny dokument. Elementy potomne ramki (iframe) są ignorowane.
Dodatkowe informacje są dostępne w kursie XUL.
<iframe src="table.php" flex="2" id="browserTable" name="table_frame"/>
Wybór adres URL z menu
<menulist oncommand="doNav(this);">
<menupopup>
<menuitem label="Mozilla" value="http://mozilla.org" />
<menuitem label="Slashdot" value="http://slashdot.org"/>
<menuitem label="Sourceforge" value="http://sf.net" />
<menuitem label="Freshmeat" value="http://freshmeat.net"/>
</menupopup>
</menulist>
<iframe id="myFrame" flex="1"/>
<script>
function doNav(obj){
var url = obj.selectedItem.value;
// firstChild odpowiada elementowi menupopup
document.getElementById('myFrame').setAttribute('src', url);
}
</script>
src
Dziedziczy z elementu XUL |
accessiblecontentDocument
contentWindowdocShell