<input type='text' id='check_numb' onblur='do()'>
function check_numb(){ var numb=$('#check_numb').val(); if(!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(numb))){ $('#check_id').text('手机号错误,请从新输入') return false }else{ $('#check_id').text('') return true }
函数放在$(function())外面