Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML selected="selected" not working [closed]

Tags:

html

select

Hi can somebody tell me what is the wrong in the below code?

Selected="selected" not working for me.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">     <select id="tstselect" name="tstselect" onchange="showselected(this.value);">     <option value="0" >0</option>     <option value="1" >1</option>     <option value="2" >2</option>     <option value="3" selected="selected">3</option>     </select> 

Thanks in advance

like image 444
jestges Avatar asked Feb 24 '12 06:02

jestges


1 Answers

You probably have something on your page selecting the value. You might be able to quickly verify that if the same value is still selected after changing the order of the options in the html...

You might want to refer to: Firefox ignores option selected="selected"

like image 194
David Avatar answered Sep 20 '22 19:09

David