摘要:
//userinfo是from表单名(name),email是文本框名(name) if(document.userinfo.email.value.length!=0) { if (document.userinfo.email.value.charAt(0)=="." || document.userinfo.email.value.charAt(0)=="@"|| document.userinfo.email.value.indexOf('@', 0) == -1 || document.userin... 阅读全文
摘要:
1.文本框只能输入数字代码(小数点也不能输入): <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">2.文本框只能输入数字(包含小数点)<input onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(v 阅读全文