How do I change a message when I select different values from a select box using jquery.
<select name="myname">
<option value="rahul" selected>Rahul</option>
<option value="aisha">aisha</option>
</select>
If rahul is selected show a message hello rahul or if aisha is selected then show a message hello aisha
You can use the change() event
Here’s a fiddle : http://jsfiddle.net/HjVxR/