Html代码:
<tr>
<td height="90" align="center" class="color999">
<input name="Agreements" type="checkbox" />我已认真阅读并同意遵守<a href="#" class="color-green">用户服务协议</a>
</td>
</tr>
<tr>
<td height="50" align="center">
<input type="button" name="SureBtn" id="SureBtn" value="完成提交" class="cre-button" style="display: none" />
</td>
</tr>
JQ代码:
<script>
$(function () {
//监控checkbox代码
$("input[name='Agreements']").on("change", function () {
var change = $("input[type='checkbox']").is(':checked'); //checkbox选中判断
if (change) {
$("#SureBtn").css("display", "block");
$("#SureBtn").click(function () {
var str = $(" input[name='WorkYears']").val();
alert($("input[name='Agreements']").is(':checked'));
})
} else {
$("#SureBtn").css("display", "none");
return false;
}
})
})
</script>