inputSize = Math.max(1, this.placeholderText.length); Math.max(this.inputSize, $input.val().length);
Chinese characters is 2 length,placeholderText not fully displayed。
function() {
var len = 0;
for (var i=0; i<this.length; i++) {
if ((this.charCodeAt(i) & 0xff00) != 0){
len ++;
}
len ++;
} return len;
}
inputSize = Math.max(1, this.placeholderText.length); Math.max(this.inputSize, $input.val().length); Chinese characters is 2 length,placeholderText not fully displayed。 function() {
var len = 0;
for (var i=0; i<this.length; i++) { if ((this.charCodeAt(i) & 0xff00) != 0){ len ++; } len ++;
} return len;
}