Your Search Results


    appendItem( label, value )
    Return type: element
    Creates a new item and adds it to the end of the existing list of items. You may optionally set a value. The function returns the newly created element.


    <script language="javascript">
    function addItemsToList(){
    	var list = document.getElementById('myMenuList');
    	// add item with just the label
    	// add item with label and value
    	list.appendItem('Two', 999);
    	// Select the first item
    	list.selectedIndex = 0;
    <button label="Add items" oncommand="addItemsToList()"/>
    <menulist id="myMenuList">

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, Enn, MarkFinkle, ethertank, Marsf, trevorh, Ptak82, Mgjbot, Pmash, Dria
    Last updated by: Sheppy,