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

HTML DOM Select remove() method

Select remove() method

Select Object Reference Select object


Definition and Usage

The remove() method is used to delete an option from a dropdown list.

Syntax

selectObject.remove(

index

)

Parameters Description
index Required. Specifies the index number of the option to delete.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the remove() method


Example

Example

The example below deletes the selected option from the list:

Runoob Tutorial(runoob.com)

Try it »


More examples

Delete the last option from a dropdown list


Select Object Reference Select object