IE8 Javascript doesnt run unless Developer Tools i

2019-04-05 03:53发布

For some reason, in IE8, javascript is not running unless I reload the page with Developer Tools open. I close developer tools and reload the page and the javascript stops working. I'm not getting any error reports (not that they'd be any use anyway).

Anyone else had this problem?

3条回答
我命由我不由天
2楼-- · 2019-04-05 04:07

I found that I needed more than to just check for the existance of console. I used the answer from this thread. It traps all sorts of methods in the console object.

查看更多
乱世女痞
3楼-- · 2019-04-05 04:22

Often that's because you left a console.log call in your script. This only works when a debugger is present. You should get a JS error on trying to use it unless you have them turned off.

查看更多
手持菜刀,她持情操
4楼-- · 2019-04-05 04:22

Close Developer Tools, close IE8, re-open, refresh with clear-cache: CTRL-F5 This should do the trick if you don't have any special JavaScript communicating with Developer Tools.

查看更多
登录 后发表回答