Select remove() method
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





All major browsers support the remove() method
Example
Example
The example below deletes the selected option from the list:
Try it »
More examples
Delete the last option from a dropdown list
Select object