天天看點

js表單送出限制空格和空值

 var isNull=/^[\s' ']*$/

if(isNull.test(tel)&&isNull.test(mobile))

 {

    alert('Phone number and mobile phone number cannot be empty .'); return;  

 }

繼續閱讀