ilikephp Posted January 2, 2011 Share Posted January 2, 2011 Hello! How can I set value=0 to option 1a? Thank you, if(a==1) { document.getElementById("destination").innerHTML="<select name='combo2'><option>option 1 a</option><option>option 1b</option><option>option 1c</option></select>"; } Link to comment https://forums.phpfreaks.com/topic/223213-combo-box/ Share on other sites More sharing options...
taquitosensei Posted January 2, 2011 Share Posted January 2, 2011 Not a question for the php board but... like this if(a==1) { document.getElementById("destination").innerHTML="<select name='combo2' value='0'><option>option 1 a</option><option>option 1b</option><option>option 1c</option></select>"; } Link to comment https://forums.phpfreaks.com/topic/223213-combo-box/#findComment-1153933 Share on other sites More sharing options...
ilikephp Posted January 2, 2011 Author Share Posted January 2, 2011 Thanks... (Y) Link to comment https://forums.phpfreaks.com/topic/223213-combo-box/#findComment-1153939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.