This post will discuss how to remove a given option from a dropdown list in JavaScript and jQuery.

1. Using jQuery

To remove an option from a dropdown list, you can use jQuery’s .remove() method. The .remove() method will remove the specified elements out of the DOM.

 
Using jQuery’s attribute selector, you can use any of the following methods to find the corresponding <option> element:

 
Here’s a complete example.

JS


HTML



Edit in JSFiddle

2. Using JavaScript

In plain JavaScript, you can get the corresponding option with the querySelector() method and call the JavaScript’s remove() method upon it.

JS


HTML



Edit in JSFiddle

That’s all about removing an option from a drop-down list in JavaScript and jQuery.