javascript - How to change selected option value when button is clicked -
change option value when button click
<button class="btn1">clickme1</button> <button class="btn2">clickme2</button> <select> <option value="1">changevalue1</option> <option value="2">changevalue2</option> </select>
check updated jsfiddle :- jsfiddle
$('#dynamicchange').val('1').trigger('change'); $('#dynamicchange').val('2').trigger('change');
Comments
Post a Comment