Absolute solution to "completed but incorrect webpage"

Source: Internet
Author: User

Sometimes the webpage we create will prompt "completed, but there is an error on the webpage", which is a JS script problem. For some cainiao and novice webmasters, solving these problems is an astronomical solution. Because Javascript is copied everywhere, how can we eliminate this problem? Now let's share a code that blocks JS script errors.

Copy to ClipboardReference: [www.bkjia.com] <! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8"/>
<Title> JavaScript Fault-Tolerant script </title>
</Head>
<Body>
<Script language = "JavaScript">
<! -- Hide
Function killErrors (){
Return true;
}
Window. onerror = killErrors;
// -->
</SCRIPT>
</Body>
</Html>

Related Article

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.