diff options
Diffstat (limited to 'files/pl/mozilla/tech/xul/metoda/appenditem/index.html')
| -rw-r--r-- | files/pl/mozilla/tech/xul/metoda/appenditem/index.html | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/files/pl/mozilla/tech/xul/metoda/appenditem/index.html b/files/pl/mozilla/tech/xul/metoda/appenditem/index.html deleted file mode 100644 index 11e663c173..0000000000 --- a/files/pl/mozilla/tech/xul/metoda/appenditem/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: appendItem -slug: Mozilla/Tech/XUL/Metoda/appendItem -tags: - - Dokumentacja_XUL - - Metody_XUL -translation_of: Archive/Mozilla/XUL/Method/appendItem ---- -<div class="noinclude"><span class="breadcrumbs XULRefMeth_breadcrumbs">« <a href="/pl/docs/Dokumentacja_XUL" title="/pl/docs/Dokumentacja_XUL">Dokumentacja XUL</a></span></div> -<dl><dt> <span id="m-appendItem"><code><a href="https://developer.mozilla.org/pl/docs/Mozilla/Tech/XUL/Metoda/appendItem">appendItem( label, value )</a></code></span> -</dt><dd> Zwraca typ: <i>element</i> -</dd><dd> Tworzy nową pozycję i dodaje ją na koniec istniejącej listy pozycji. Opcjonalnie posiada ustawioną wartość. Funkcja zwraca nowo utworzony element. </dd></dl> -<div class="noinclude"> -<h3 id="Przyk.C5.82ady" name="Przyk.C5.82ady"> Przykłady </h3> -<pre><script language="javascript"> -function addItemsToList(){ - var list = document.getElementById('myMenuList'); - - // dodaje pozycję tylko z etykietą - list.appendItem('One'); - - // dodaje pozycję z etykietą i wartością - list.appendItem('Two', 999); - - // wybiera pierwsza pozycję - list.selectedIndex = 0; -} -</script> - -<button label="Dodaj pozycję" oncommand="addItemsToList()"/> -<menulist id="myMenuList"> - <menupopup/> -</menulist> -</pre> -<h3 id="Zobacz_tak.C5.BCe" name="Zobacz_tak.C5.BCe"> Zobacz także </h3> -<p><code><a href="pl/XUL/Metoda/insertItemAt">insertItemAt()</a></code> i <code><a href="pl/XUL/Metoda/removeItemAt">removeItemAt()</a></code> -</p> -</div> |
