摘要:
for (var i = 0; i < txtval.length; i++) { if (isChinese(txtval.charAt(i)) == true) { strlen = strlen + 2; //中文为2个字符 } else { strlen = strlen + 1; //英文一个字符 } } strlen = Math.ceil(strlen / 2); //中英文相加除2取整数 阅读全文
摘要:
(function($){ $.fn.extend({ textareaAutoHeight: function (options) { this._options = { minHeight: 0, maxHeight: 1000 } this.init = function () { for (var p in options) { this._options[p] = opti... 阅读全文