linux1880 Posted August 25, 2010 Share Posted August 25, 2010 <select name="hello" id="select_hello"> <option value="hello1">Hello 1</option> <option selected value="hello2">Hello 2</option> <option value="hello3">Hello 3</option> <option value="hello4">Hello 4</option> </select> I have the following code, why is options 'hello2' not being selected when page load ? pls help Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 25, 2010 Share Posted August 25, 2010 See the correct HTML syntax at this link: http://w3schools.com/tags/att_option_selected.asp Quote Link to comment Share on other sites More sharing options...
chintansshah Posted September 22, 2010 Share Posted September 22, 2010 don't use only selected, use selected="selected" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.