<div id="textCount"></div>
<script type="text/javascript">
window.οnlοad=function(){
var editors=FCKeditorAPI.GetInstance('body');
editors.Events.AttachEvent('OnSelectionChange', editor_keydown);
function editor_keydown(editors){
var maxLength=420; //最大输入字数
content= $(editors.EditorDocument.body).text();
var len= content.length;
if(len>420){
alert('你已经输入的次数超过420了');return;
}
var sheng=maxLength-len;
$('#textCount').html("你还可以输入<span style='color:red;'>"+sheng+"</span>个字");
}
//alert(editors);
}
</script>
fck 添加字数统计
最新推荐文章于 2018-08-23 17:12:09 发布