texearea 限制字数_textarea限制字数提示

*{ padding: 0; margin: 0;}

.pl80{ padding-left: 80px!important;}

.user-center .lmf-box{padding: 0 0 40px 0;}

.user-center .lmf-box .title{ text-indent: 10px; height: 38px; font: normal 14px/38px "microsoft yahei"; color: #333; background: #fafafa; border-bottom: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;}

.user-center .lmf-box .table-list{ width: 94%; font: normal 12px/22px "microsoft yahei"; color: #666; margin-top: 20px;}

.user-center .lmf-box .table-list .txtbold{font: normal 18px/22px "microsoft yahei"; color: #333;}

.user-center .lmf-box .table-list td{ padding:10px 0;}

.user-center .lmf-box .table-list select.common{ width: 200px; height: 30px; border: 1px solid #cbcbcb;}

.user-center .lmf-box .table-list input.common{width: 200px; height: 28px; border: 1px solid #cbcbcb; }

.user-center .lmf-box .table-list textarea.common{max-width: 628px; resize: none; width: 628px; height: 80px; border: 1px solid #cbcbcb; text-indent: 10px;}

.user-center .lmf-box .table-list .textarea-pop{width: 650px;}

退货说明:

还可以输入200个字

change_length_fun=function(obj,num){

$(obj).on('keyup',function(){

var len = $(obj).val();

console.log(num-len.length)

$(obj).siblings(".js-show-length").find(".js-num").text(num-len.length);

if(len.length>=num){

$(obj).siblings(".js-show-length").find(".js-num").text(0);

$(obj).val(len.substring(0,num));

}

});

/* 界面结构布局要求

还可以输入200个字

*/

}

change_length_fun(".js-change-length",200)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值