How to change Option one value to selected after a click event or after an onClick function

I am Using this code to change the option value but it doesn't work !


    <script src=""></script>
    <script type="text/javascript">
       function changeDefaultSelection(){


   <select id="selectVehicle">
      <option  value="0"> Please Select A Vehicle </option>
      <option  value="1"> Car </option>
      <option  value="2"> Bus </option>
<button onclick="changeDefaultSelection()"> Change me</button>

Answers 1

Related Articles