1.驗證聯繫電話:/^[0-9]{1}[0-9]{2,3}-[1-9]{1}[0-9]{5,8}$/
2.驗證手機號碼:/^1[3|4|5|8][0-9]\d{4,8}$/
3.驗證郵箱地址:/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/
4.驗證有多少個字,按字節算
var l=0;
for(var i=0;i<education.length;i++)
{
if(education.charCodeAt(i)>255) l+=2;
else l++;
}
if(l>300){
alert('教育經歷不能超過150個漢字!');
$('#education').focus();
return false;
}