hvle Posted June 11, 2006 Share Posted June 11, 2006 It is like this:i have a html file like this:<html><body> <select id="continent" name="continent"> <option value="Africa">Africa</option> </select></body></html>it's a select named continent.how do I regard or pass this 'continent' as a variable in a java script?case 1: somefunction(continent); orcase 2: somefunction(document.continent) i know in IE, you can pass it like case 1.but other browser won't take it.any idea? Link to comment https://forums.phpfreaks.com/topic/11706-variables-precendance-and-descendance/ Share on other sites More sharing options...
nogray Posted June 12, 2006 Share Posted June 12, 2006 use document.getElementById('continent').value to get the select value. Link to comment https://forums.phpfreaks.com/topic/11706-variables-precendance-and-descendance/#findComment-44656 Share on other sites More sharing options...
hvle Posted June 13, 2006 Author Share Posted June 13, 2006 that's it, thanks Link to comment https://forums.phpfreaks.com/topic/11706-variables-precendance-and-descendance/#findComment-44821 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.