对select中数据的调用操作

类别:网站制作 点击:0 评论:0 推荐:

<script language="javascript">
function appear(){
var s=document.all.select
var t=s.options[s.options.selectedIndex].text
var v=s.options[s.options.selectedIndex].value
var i=0;
var x,y;
x=v.substring(0,v.indexOf(","));
y=v.substring(v.indexOf(",")+1,v.length);
alert(x);
alert(y);
}

</script>

<select size="10" onDBlClick="appear();" name="select">
<option value="100,200">11</option>
<option value="2,4">22</option>
</select>

本文地址:http://com.8s8s.com/it/it31206.htm