html - Set value of select element based on GET parameters, without JavaScript? -


here's basic html question you:

<form method="get" action="#"> <select id="u" name="u">   <option value="nothing" title=""></option>  <option value="adamt" title="at">adam temple</option>   <option value="alexp" title="ap">alex potts</option>  </select> <input type="submit" /> </form> 

after submitting form, url ends ?u=adamt. however, list has reverted blank element.

is there way make list pre-selected correct option, without using javascript?

add selected (its boolean attribute) appropriate <option> element in whatever server side language use process form.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -