帮助理解的一段代码
<div id = "test">
    <span style="color:red">test1</span>
    <span style="color:blue">test2</span>
</div>
<a href="javascript:alert(test.innerHTML)">innerHTML内容</a>
<a href="javascript:alert(test.innerText)">innerText内容</a>
<a href="javascript:alert(test.outerHTML)">outerHTML内容</a>
<a href="javascript:alert(test.outerText)">outerText内容</a>
 
形象图