Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 html 页面无法在 IE 浏览器中运行。如果我打开 F12 开发人员工具,它就会开始工作。我的页面可以使用 chrome。我猜这是由 jquery 和 javascript 引起的。谁能知道如何使它工作?谢谢
如果您在其中的任何地方使用 console.log,IE 会使您的脚本崩溃。开发人员工具添加了控制台功能 - 因此,如果您打开它,它就可以工作。删除console.log,它应该可以正常工作了。
Chrome/Firefox 默认支持这个,这就是为什么它在那里工作没有问题。
您可能在某处的代码中使用了 console.log() 。除非开发工具窗口处于活动状态,否则 IE 控制台对象不存在。