title: How to reset the selected index dropdown value in html?
body: <p>I need to set the selectedindex=0 for dropdown after submit form.
  I tried like the below.</p>
  
  <pre><code> $("#filterByName").prop('selectedIndex', 0);
   $("#filterByName").selectedIndex=0;
  $("#filterByName").get(0).selectedindex=0;
  </code></pre>
  
  <p>but i am not able to acheive .please tell me how to reset the dropdown after submit form.</p>
  
  <p>EDIT:
  $('#filterByName')[0].selectedIndex .in that i am getting selected index value.after sumit click i am setting $('#filterByName')[0].selectedIndex=0 then this statement not setting showing the index 0 after click event.assigning but why in UI is not showing ?</p>
  
  <pre><code>&lt;span id="filterByNames"&gt;&lt;%= Html.DropDownList("filterByName", new SelectList(Model.Names, "Name", "Name", Model.Name), 
                                  new { onchange = "filterByName()" }) %&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Please check my code and let me know how to reset the dropdown selected index after button click?</p>