<body> XSS攻击之基础篇:HTML标签与字符串的渲染 测试 <div class="a1"> </div> <div class="a2"> </div> <script type="text/javascript"> $(function () { $('.a1')[0].innerText = ('<h1>11111</h1>'); $('.a2')[0].innerHTML = ('<h1>22222</h1>'); }) </script> </body>
<body> XSS攻击之基础篇:HTML标签与字符串的渲染 测试 <div class="a1"> </div> <div class="a2"> </div> <script type="text/javascript"> $(function () { $('.a1')[0].innerText = ('<h1>11111</h1>'); $('.a2')[0].innerHTML = ('<h1>22222</h1>'); }) </script> </body>