标签:function input class character pre 字符 tchar limited cti
function limitedNumberOfInputCharacters(limitedNumber, string){ var strLength = 0; if(string !== null || string !== ""){ strLength = string.length; } if(strLength>limitedNumber){ strLength = limitedNumber; } var leftLength = limitedNumber - strLength; //剩余个数 console.log("您还可以输入"+leftLength + "个字符"); }
标签:function input class character pre 字符 tchar limited cti
原文地址:http://www.cnblogs.com/zyjzz/p/7061340.html