$("input").keyup(function(){ name_length=getLength($(this).val()); console.log(name_length) })
function getLength(str){ return str.replace(/[^\x00-xff]/g,"xx").length; }
posted on 2017-05-08 21:16 神乐丶 阅读(131) 评论(0) 收藏 举报