function CheckTxtLength(txt) { var num = txt.replace(/[^x00-xff]/g, 'xx').length; if (num <=11) { return true; } return false; }
注:11代表最大长度
num代表 该文本框内容的字符长度 length