어떻게이 코드 카운트 문자를 단어로 만들 수 있습니까?어떻게하면이 카운트 문자를 단어로 만들 수 있습니까
감사
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