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? Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/11706-variables-precendance-and-descendance/#findComment-44821 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.