<html><head><script type="text/javascript">function formAction(){ var x=document.getElementById("mySelect") alert(x.form.name)}</script></head><body><form name="myForm"> <select id="mySelect"> <option>Apple</option> <option>Banana</option> <option>Orange</option> </select> <input type="button" onclick="formAction()" value="Show name of the form"></form></body></html>
Name (required)
email (will not be published) (required)
Website