<div id="textCount"></div>
<script type="text/javascript">
window.onload=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 添加字数统计
最新推荐文章于 2021-06-02 19:07:42 发布
1100

被折叠的 条评论
为什么被折叠?



