Name

Select.remove( ): remove an <option> — DOM Level 2 HTML

Synopsis

void remove(longindex);

Arguments

index

The position within the options array of the <option> element to be removed.

Description

This method removes the <option> element at the specified position in the options array. If the specified index is less than zero or greater than or equal to the number of options, the remove( ) method ignores it and does nothing.

See Also

Option

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.