就是 你把
String.prototype.len = function() 
{ 
return this.replace(/[^\x00-\xff]/g, "xx").length; 
} 
放到你的 <Script></script>当中去,
然后你要判断长度的那里 就这么用
alert($("#文本框id").val().len());
就行了
    
    
 
文章标签 javascript 汉字数量 javascript 文本框 文章分类 JavaScript 前端开发
就是 你把
String.prototype.len = function() 
{ 
return this.replace(/[^\x00-\xff]/g, "xx").length; 
} 
放到你的 <Script></script>当中去,
然后你要判断长度的那里 就这么用
alert($("#文本框id").val().len());
就行了
    
    
 
            
        python查询汉字函数
oracle
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M