//检查是否阅读协议
if(!$("#read").is(":checked"
)){ //一句就ok了
layer.
open({
type: 1,
skin: 'layui-layer-rim',
//样式类名
closeBtn:
false,
//不显示关闭按钮
area:['300px','90px'],
shift: 2,
shadeClose:
true,
//开启遮罩关闭
content: '<div style="width:100px;height:50px;line-height:50px;text-align:center">请阅读协议</div>'
});
return false;
}
用$("#read").attr("checked")属性一直没生效,用上面的就解决问题了。
转载于:https://www.cnblogs.com/doubilaile/p/4695649.html