option标签如何获取显示信息 s中怎么获取之间的文本信息

2011-12-01 18:02shanzhileng | 分类:JavaScript  浏览2413次
<select name="city" >乌鲁木齐</option>
</select>

如上,怎么获取城市的名称????????????????
 
 
 
 
var obj = document.getElementById("ci");
var txt = obj.options[obj.selectedIndex].text;
alert(txt);