option标签如何获取显示信息 s中怎么获取之间的文本信息
<select name="city" >乌鲁木齐</option>
</select>
如上,怎么获取城市的名称????????????????
var obj = document.getElementById("ci");
var txt = obj.options[obj.selectedIndex].text;
alert(txt);
<select name="city" >乌鲁木齐</option>
</select>
如上,怎么获取城市的名称????????????????
var obj = document.getElementById("ci");
var txt = obj.options[obj.selectedIndex].text;
alert(txt);