0
내가 문자열에서 HTML 태그를 제거해야하는 기능이없이 HTML 태그를 제거, 여기 내 코드의 <html><head><title>sample site</title></head><body><div>text<div>more text</div>and more...</div>in body</body></html>
자바 스크립트 정규식
하지만이 출력을 얻을 :
text
more text
and more...
in body
저는 꽤 javascript에 익숙합니다. 누군가 'samle 사이트'가 출력에없는 이유를 설명 할 수 있습니까?
DOM을 사용하려면 https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent를 참조하십시오. – elclanrs