勾选复选框按钮可用否则不可用

勾选复选框按钮可用否则不可用

function check(){
var chec=document.getElementById("chec");
if(chec.checked==true){
alert(1111)
document.getElementById("btn").removeAttribute("disabled")
}else{
alert(22222)
document.getElementById("btn").disabled="disabled"
}
}











转载于:https://www.cnblogs.com/yaomengli/p/6877492.html

你可能感兴趣的:(勾选复选框按钮可用否则不可用)