css - JavaScript 怎么看解析后的源代码?
本文介绍了css - JavaScript 怎么看解析后的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
比如我写了个脚本:
<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)
这篇关于css - JavaScript 怎么看解析后的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文