I'm using Firebug and have some statements like:(我正在使用Firebug,并且有一些类似的语句:)
console.log("...");
in my page.(在我的页面中。) In IE8 (probably earlier versions too) I get script errors saying 'console' is undefined.(在IE8(可能也是早期版本)中,我收到脚本错误,提示“控制台”未定义。) I tried putting this at the top of my page:(我尝试将其放在页面顶部:)
<script type="text/javascript">
if (!console) console = {log: function() {}};
</script>
still I get the errors.(仍然我得到错误。) Any way to get rid of the errors?(有什么办法摆脱错误?)
ask by user246114 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…