0
견인을 찾으려고 노력하고 있어요 innerhtml 안에 여러 가지 texttypes, 어떻게 든 그것은 아무것도 찾을 수 없습니다하지만 내가 같은 기능과 테스트 샘플과 함께 그것을 테스트 할 때 작동합니다.자바 스크립트 innerHtml을 통해 검색 할 수 없습니다
function numberoftext (a){if (a.match(/class=\"chattext\"/g)!==null){return a.match(/class=\"chattext\"/g).length;}else{return 0;}}
function numberofglobal (a){if (a.match(/class=\"chattextglobal\"/g)!==null){return a.match(/class=\"chattextglobal\"/g).length;}else{return 0;}}
function numberofclan (a){if (a.match(/class=\"chattextclan\"/g)!==null){return a.match(/class=\"chattextclan\"/g).length;}else{return 0;}}
function numberofgroup (a){if (a.match(/class=\"chattextgroup\"/g)!==null){return a.match(/class=\"chattextgroup\"/g).length;}else{return 0;}}
function numberofwisper (a){if (a.match(/class=\"chattextwhisper\"/g)!==null){return a.match(/class=\"chattextwhisper\"/g).length;}else{return 0;}}
function numberofworld (a){if (a.match(/class=\"worldsay\"/g)!==null){return a.match(/class=\"worldsay\">/g).length;}else{return 0;}}
function numberofscream (a){if (a.match(/class=\"chattextscream\"/g)!==null){return a.match(/class=\"chattextscream\"/g).length;}else{return 0;}}
var innertextraw1 =chatupdateFrame.document.documentElement.innerHTML;
var innertextraw= innertextraw1.substring(innertextraw1.indexOf("parent.chattextFrame.add(")+26, innertextraw1.indexOf("', 0);"));
console.log("got update",innertextraw);
console.log("t:",numberoftext(innertextraw),"c:",numberofclan(innertextraw),"w:",numberofwisper(innertextraw),"gr:",numberofgroup(innertextraw),"gl:",numberofglobal(innertextraw),"sc:",numberofscream(innertextraw));
는 innertextraw에 대한 예는 다음과 같습니다 "<p class=\"chattext\"><i><b>noone</b> goes with <b>someone</b> to the house</i></p>"
내가 콘솔 로그에서 가져온 예에 innertextraw 설정도 할 때 that처럼 테스트를하는 것은 잘 작동, 웹 사이트에 그냥 0