我如何使這個代碼數字字符而不是單詞。我怎樣才能使這個數字字符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