therealwesfoster Posted May 30, 2008 Share Posted May 30, 2008 I have a select: <select name="name" onChange="function(this.value)"> <option value="0">zero</option> <option value="1">one</option> <option value="2">two</option> </select> But instead of the onChange getting the VALUE of the option (0, 1, 2, etc), I want it to get the innerHTML part (zero, one, two etc) How can i do this? Wes Link to comment https://forums.phpfreaks.com/topic/107924-get-option-innerhtml/ Share on other sites More sharing options...
haku Posted May 30, 2008 Share Posted May 30, 2008 object.firstChild.data Where 'object' is the option element you want to get the data from. Link to comment https://forums.phpfreaks.com/topic/107924-get-option-innerhtml/#findComment-553231 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.