作为基础,我们有以下HTML页面:
<html><body>
<div>Unescaped characters: < > </div>
<div>Escaped characters: < > </div>
</body></html>
Testcase 1:innerHTML和outerHTML(result =都被转义)
<div>Unescaped characters: < > </div>
<div>Escaped characters: < > </div>
测试用例2:innerText(结果=未转义)
<div>Unescaped characters: < > </div>
<div>Escaped characters: < > </div>
哪个javascript函数会给我一些开头显示的确切HTML源代码(一个转义,另一个未转义)?