转自:http://hi.baidu.com/any110/blog/item/f45f48f3d0d701cf0a46e017.html

<html>
<head>
<script language="javascript">
function func(obj){
alert("the inner text is "+obj.options[obj.selectedIndex].innerText);

alert("the value is "+obj.options[obj.selectedIndex].value);
}
</script>
<title>test</title>
</head>
<body>
<select name="select1" onchange="func(this);">
<option value="1">一</option>
<option value="2">二</option>
<option value="3">三</option>
<option value="4">四</option>
</select>
</body>
</html>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2022-01-31
  • 2021-12-10
  • 2021-12-10
猜你喜欢
  • 2021-12-20
  • 2021-12-10
  • 2021-12-01
  • 2022-12-23
  • 2021-10-24
相关资源
相似解决方案