scout1idf Posted January 17, 2011 Share Posted January 17, 2011 Is there a way to have a radio button option preselected? <form><input type="radio" name="vacation" value="yes" /> Yes<br /><input type="radio" name="vacation" value="no" /> No<br /><input type="radio" name="vacation" value="maybe" /> Maybe</form> Just for example I would like to have "Yes" as the default answer. Link to comment Share on other sites More sharing options...
jeffman Posted January 17, 2011 Share Posted January 17, 2011 <input type="radio" name="vacation" value="yes" checked="checked" /> Link to comment Share on other sites More sharing options...
scout1idf Posted January 17, 2011 Author Share Posted January 17, 2011 Thank you, it worked great...The examples I looked at showed selected="selected" ...for drop down lists but I didn't see anything for "radio" or "check boxes".Maybe they could be added to the examples on the W3school... Link to comment Share on other sites More sharing options...
thescientist Posted January 17, 2011 Share Posted January 17, 2011 they're therehttp://www.w3schools.com/jsref/dom_obj_radio.asphttp://www.w3schools.com/jsref/dom_obj_checkbox.asp Link to comment Share on other sites More sharing options...
scout1idf Posted January 18, 2011 Author Share Posted January 18, 2011 they're therehttp://www.w3schools.com/jsref/dom_obj_radio.asphttp://www.w3schools.com/jsref/dom_obj_checkbox.asp I only looked in the HTML section under FORMS. I didn't think to look anywhere else.... Link to comment Share on other sites More sharing options...
Ingolme Posted January 18, 2011 Share Posted January 18, 2011 The tutorials are there to get you started, but if you want details, check the references. Here's the HTML tag reference, with all available tags and attributes: http://w3schools.com/tags/ Link to comment Share on other sites More sharing options...
thescientist Posted January 18, 2011 Share Posted January 18, 2011 I only looked in the HTML section under FORMS. I didn't think to look anywhere else....try using the search form in the upper right part of the page to find more info, as there usually is. Link to comment Share on other sites More sharing options...
jeffman Posted January 18, 2011 Share Posted January 18, 2011 Or use the HTML reference section to locate information about individual tags and their attributes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.