<!DOCTYPE html>
<html>
<body>
<h1>My First Web Page</h1>
<p id="demo">My First Paragraph.</p>
<script>
document.getElementById("demo").innerHTML="My1 First JavaScript";
</script>
<se>
<script type="text/javascript">
function checkLawyerType() {
var lawyerType1 = document.getElementById("lawyerType").innerHTML;
var lawyerType = document.getElementById("lawyerType").value;
var account = document.getElementById("account")
alert(lawyerType1);
if(lawyerType=="1"){
account.readOnly = false ;
}else{
account.readOnly =true ;
}
};
</script>
<select id="lawyerType" htmlEscape="false" maxlength="30" minlength="1" class="form-control required" onchange = "checkLawyerType();">
<option value ="0"></option>
<option value ="1">执行</option>
<option value="2">仲裁</option>
</select>
<input name ="account" id ="account" readOnly="true">
</body>
</html>
js中select标签中选中一个选项之后触发事件
最新推荐文章于 2025-03-21 10:00:00 发布