<script language="javascript">
function chk(){
var obj = document.getElementById("sel");
var str_text = obj.options[obj.selectedIndex].text;
var str_value = obj.options[obj.selectedIndex].value;
if (confirm("确定要选择"+strsel+"吗?")){
}else{
}
}
</script>
<select name="sel" οnchange="return chk()">
<option value=1>a001</option>
<option value=2>a002</option>
<option value=3>a003</option>
</select>
js取select的text值和value值
最新推荐文章于 2023-07-06 22:33:57 发布