<%@ page language="java" pageEncoding="gb2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">
function selectOnchange(q)
{
if(q.selectedIndex == 1)alert(document.getElementById('select').value);
}
</script>
</head>
<body>
<form name="frm">
<select name="select" onchange="selectOnchange(this)">
<option value="opValue1"></option>
<option value="opValue2">111111111</option>
</select>
</form>
</body>
</html>
JS 读取 下拉 选项值 SELECT
最新推荐文章于 2021-08-05 15:07:38 发布