function WidthCheck(str, maxLen){ var w = 0; var tempCount = 0; //length 获取字数数,不区分汉子和英文 for (var i=0; i<str.value.length; i++) { //charCodeAt()获取字符串中某一个字符的编码 var c = str.value.charCodeAt(i); //单字节加1 if ((c >= 0x0001 && c <= 0x007e) || (0x…
// 验证开头不为零的正整数 WST.zhengZhengShuIn = function (className){ var rex = /^[1-9]{1}[0-9]*$/;//正整数 $("."+className).keyup(function(event){ var event = event || window.event; var value = $(this).val(); if(value.length>1){ var flagRex =/^0/; if(flag…