我如何使这个代码数字字符而不是单词。我怎样才能使这个数字字符insted
感谢
function word_count(){
text_value=CKEDITOR.instances.text_editor_name.getData();
var matches = text_value.replace(/<[^<|>]+?>| /gi,' ').match(/\b/g);
var count = 0;
if(matches) {
count = matches.length/2;
}
document.getElementById("word_count").innerHTML=count+" words";
}
你想指望不仅在口头上或类似的空格中的所有字符的字符服用? – jcubic
查看这两个CKEditor插件([1](http://ckeditor.com/addon/wordcount),[2](http://ckeditor.com/addon/stat))以找到最佳实施方案。 – oleq