天天看点

js表单提交限制空格和空值

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

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

 {

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

 }

继续阅读