上例中的test.innerHTML的值也就是「<span style="color:red">test1</span> test2 」。 test.innerText: 從起始位置到終止位置的內容, 但它去除Html標籤.
確定! 回上一頁