if ($("#eulaLine").is(‘:checked‘)) {
var mobile = $("#mobile").val();
if (mobile.length < 2) {
$("#checkResult").html("手机号码不能为空!");
$("#mobile").val("");
$("#mobile").focus();
return;
}
原文:http://www.cnblogs.com/newr2006/p/4280389.html