angularjs怎么获取p元素的height
1 回答

白猪掌柜的
TA贡献1893条经验 获得超10个赞
Angularjs限制textarea输入字数的实现方法:在textarea上绑定一个变量ng-model="length",统计当前输入的字数,然后在绑定一个变量通过ng-disabled="length>=140",让textarea变disabled,或者弹出框提示都可以。functionTextareaCtrl($scope){$scope.checkText=function(){if($scope.text.length>5){alert("textistoolong");$scope.text=$scope.text.substr(0,5);}};}
- 1 回答
- 0 关注
- 1225 浏览
添加回答
举报
0/150
提交
取消