比如我写了个脚本:
<script>
var a='<div style="background-color:red;height:100px;width:100px"></div>';
document.write(a);
</script>
要是在网页看源代码的话,也是:
<script>
var a='<div style="background-color:red;height:100px;width:100px"></div>';
document.write(a);
</script>
怎么才能看到:
<div style="background-color:red;height:100px;width:100px"></div>
就是JavaScript运算完后的html代码?
网页上右键“审元素”(chrome)/"查看元素"(firefox)