class="java" name="code"> <input type="checkbox" name="agree" id="agree" onchange="agree_change()" style="margin: 0px;"> <input id="toubiao_submit" onclick="kk()" disabled="disabled" type="button" class="toubiao_btn_disable" value="" title="提交"/> function agree_change(){ if($("#agree").attr("checked")=="checked"){ $("#agree").attr("checked",false) $("#toubiao_submit").attr("disabled",true); $("#toubiao_submit").removeClass("toubiao_btn_able"); $("#toubiao_submit").addClass("toubiao_btn_disable"); } else { $("#agree").attr("checked","checked") $("#toubiao_submit").attr("disabled",false); $("#toubiao_submit").removeClass("toubiao_btn_disable"); $("#toubiao_submit").addClass("toubiao_btn_able"); } }