html代码
<div class="form-check">
<input class="form-check-input position-static" type="checkbox" id="che" onclick="read()">我已阅读以上条款
</div>
javascript代码
function read() {
if($('#che').is(':checked')){
alert("选中");
}else {
alert("未选中");
}
}
标签:jQuery,单选框,代码,alert,选中,checkobx
From: https://www.cnblogs.com/tianyuanblog/p/16779183.html