Reset button on form doesn't reset selection for first element due to selected keyword in HTML
I have a reset button on a form
<input type="reset" value="Reset">
and some elections
<select>
<option value="0">A</option>
<option value="10" selected="selected">B</option>
</select>
If I click on reset, nothing happens. Here's an example.
Edit: I thought the button would reset to the first value of the select list. It seems that it was a misunderstanding of my side. I want to reset to the first selection item.
So, the only way to create a reset function in Javascript? What if the user has disabled Javascript?
+3
source to share