Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Select add() method

Select add() method

Select Object Reference Select object


Definition and Usage

The add() method is used to add to a

    

    

    

    


Note:The add() method works correctly in IE8 and later; you must add a !DOCTYPE declaration to the page. For IE versions before 8, additional code is also needed.

Try it »


More examples

Add an option before the selected option in a dropdown list


Select Object Reference Select object