摘要:
View Code 1 <asp:TextBox ID="tbP_newYear" MaxLength="3" runat="server" onkeyup="this.value=this.value.replace(/\D/g,'')"2 onafterpaste="this.value=this.value.replace(/\D/g,'')"></asp:TextBox> 阅读全文
摘要:
View Code 1 function checkEmail() { 2 var checp = document.getElementById("ctl00_ContentPlaceHolder1_txtP_EMAIL").value; 3 var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; 4 if (checp != "") { 5 ... 阅读全文
摘要:
View Code 1 function strlen(str) {2 var len;3 var i;4 len = 0;5 for (i = 0; i < str.length; i++) {6 if (str.charCodeAt(i) > 255) len += 2; else len++;7 }8 return len;9 } 阅读全文