var phone = $("input").val();
if(phone && /^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,2,3,5-9]))\d{8}$/.test(phone)){
//对的
} else{
//不对
}
只能输入正数:onkeyup="this.value=this.value.replace(/D/g,'')"
只能输入正正数:onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/D/g,'')}"
onBlur 失焦