html - Don't keep previously selected value in select box when page is reloaded -


deos know how prevent browser keeping last selected option when client reloads page?

the problem when reload page, keeps last selected option, , when select url in address bar , hit enter reset.

i want second result whicth means want browser reset select box.

please simplest , safest way :)

thanks.

just set value in javascript. way when page loaded initialized same value. using <option selected="selected"> won't work.

in javascript this:

document.getelementbyid("selectboxtobereset").options[indextobeselected].selected = true; 

and jquery helps more:

$("#selectboxtobereset").selectoptions("value selected", true); 

passing true second argument clears selected value. jquery select box tips.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -