在IE11中,如何使用console.log? [英] In IE11, How to use console.log?

查看:1482
本文介绍了在IE11中,如何使用console.log?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 console.log()但它始终打印 undefined

Try to use console.log() But it's always printting undefined.

尝试使用 Console.log IE9问题等解决方案b $ b它不起作用。

Try to use the solutions like Console.log IE9 issue it does not work as well.

在这个 IE11文档,有以下句子:

最后但并非最不重要,忘了的console.log()。现在,新工具可以轻松地支持Tracepoints,允许您以与通过console.log()相同的方式监视特定值。

In this IE11 document, there is the following sentence: Last but not least, forget about console.log(). The new tools now support Tracepoints easily allowing you to monitor specific values the same way you would via console.log().

这是什么意思?如何使用console.log在IE11中打印变量?

What does that mean? How to use console.log to print variable in IE11?

系统:windows 7( VirtualBox IE图像

System: windows 7(VirtualBox IE images)

IE版本:11

似乎 console.dir()是一个选项,但<怎么样? code>的console.log()?它位于文件,但为什么不生效?

It seems console.dir() is an option, but how about console.log()? It is in the document, but why does not take effect?

推荐答案

尽管这是一个老问题,但最近还是让我头疼IE11。

Even though it's an old question, yet still giving me headache recently when working with IE11.

简单原因: console 除非devtools(即按 F12),否则不启动对象IE11中的已打开。

Simple reason: console object is not initiated unless devtools (i.e. pressing F12 in IE11) is opened.

所以解决方法可能是,在加载 console.log()<之前打开devtools / code>。

So a workaround could be, open devtools before loading console.log().

在我的情况下,当我的页面准备就绪时, console.log 被加载,所以我打开devtools并刷新页面以查看我的日志。

In my case, console.log is loaded when my page is ready, so I open devtools and refresh the page to view my log.

这篇关于在IE11中,如何使用console.log?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆