Here I am going to show you some example with explanation that how to change a dropdown box value in jquery.

Suppose I have html element having select dropdown and I want to change the dropdown selected value on some change event.Also I can set dropdown value
value manually when I want or where I want.In the same I can get the selected value and its text or label value through jQuery.

So I have shown on below with some examples please check below details for working on dropdown select box.
Here I have a simple select /dropdown box having id=”name” and more number of options having values as well as labels/text.
Before doing everything your site needs contain latest jQuery plugin unless below examples won’t work.

1) To get slected dropdown value:

2) To set dropdown value to your name ‘Jyoti’.


3) To set dropdown value to another name ‘Jyotiranjan’.


4) To disable jyotiloppy option in dropdown down box.


5) To enable jyotiloppy option in dropdown down box.


Live Demo

Click To Run

how to change a dropdown box value in jquery
The following two tabs change content below.
Jyotiranjan is one of passionate programmer who has been working in magento since 6 years and in the mean time he has developed enormous amount of modules and customisation of sites. He loves to write blogs and travel for long journeying.

Latest posts by Jyotiranjan Biswal (see all)

Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *