IE in the case of development tool startup (open F12) JS to execute

Source: Internet
Author: User

In the development of a project encountered a bug: in 360 fast browser compatibility mode and the online environment when JS cannot be executed (360 fast browser compatibility mode in the test environment is OK),

Open F12 after the refresh is no problem, check the online said IE6/7 is no console object, IE8/9 only when the F12 is opened to create the console object,

But my project is compatible with ie789, usually with Console.log also did not appear error, and this time the bug only in 360 rapid browser compatibility mode appears,

I think it should be some browsers some versions will have the console object above when opening F12.

So when this opens the console JS to continue to execute the bug, first deal with JS in the console to see if it works:

if (window.console) {    //  ADD console commands here. } or delete Console.log

See the console object for IE6/7/8/9 and how to create a compatible debugging method:

IE6789 Browser uses Console.log similar method to output debug content without affecting the page to function properly

IE in the case of development tool startup (open F12) JS to execute

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.