<br><!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<script>
function onClickHander(obj){
if(obj.checked){
console.log("selected");
}else{
console.log("unselected");
}
}
</script>
<body>
<input id="checkBox" type="checkbox" onclick="onClickHander(this)"></input>
</body>
</html>
监听checkbox事件
最新推荐文章于 2024-09-02 10:35:06 发布