Consider the following piece of code :
<select>
<option value="0">foo</option>
<option value="1" selected="selected">bar</option>
</select>
If I select the first option and reload the page, the first option stays selected and the select does not switch to the second option. How can I force firefox to give priority to the html?
Good question. I think this can't be done using pure HTML.
You could try using JavaScript to reset the form. I don't know what it will reset to, but I guess it will do what you want:
document.forms["formname"].reset();
needs to be triggered on the load
event of course (or in ready()
in jQuery).
Select the second option using Javascript on page load.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With