简单javascript取值问题
<td> <SELECT style= "WIDTH: 81px " name= "address ">
<option value= "请选择 " > 请选择 </option>
<option value= "上海 "> 上海 </option>
<option value= "深圳 "> 深圳 </option>
<option value= "嘉兴 "> 嘉兴 </option>
</SELECT> </td>
如何取所选值
谢谢~~~~~
------解决方案-------------------- <td> <SELECT style= "WIDTH: 81px " name= "address " onchange= "alert( 'text: ' + this.options[this.selectedIndex].text + '\nvalue: ' + this.value) ">
<option value= "请选择 " > 请选择 </option>
<option value= "sh "> 上海 </option>
<option value= "sz "> 深圳 </option>
<option value= "jx "> 嘉兴 </option>
</SELECT> </td>
------解决方案--------------------值document.getElementById( "address ").value
显示的部分document.getElementById( "address ").options[document.getElementById( "address ").selectedIndex].text
------解决方案--------------------document.all.address.value