限制文本框,文本域输入的字符数量
摘要:
function limitCharsNum(charsNumSpanId,id,max){ setTimeout(function(){ var valLen=$("#"+id).val().length; console.log(max); if(valLen>max) { console.log(valLen); $("#"+id).val($("#"+id).val().substring(0,max)); } $("#"+charsNumSpanId).text((ma... 阅读全文
posted @ 2013-10-17 17:44 passer1991 阅读(368) 评论(0) 推荐(0) 编辑