JavaScript fault tolerant script

Source: Internet
Author: User
Tip: you can modify some code before running

<p><Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"><br /><Html><br /><Head><br /><Title> JavaScript fault-tolerant script </title><br /><Style type = "text/css"><br /><! --<br />Body {font-family: ""; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}<br />A {COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none}<br />A: hover {COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline}<br />A: active {font: 9pt ""; cursor: hand; color: # FF0033}<br />--><br /></Style><br /><Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"><br /></Head></p><p><Body><br /><Script language = "JavaScript"><br /><! -- Hide</p><p>Function killErrors (){<br />Return true;<br />}</p><p>Window. onerror = killErrors;</p><p>// --><br /></SCRIPT><br /><Br><br /><Br><br /><Center> <font color = red face = "" size = 6> JavaScript fault-tolerant scripts </font> </center><br /><Br><br /><Br> <center><br /><Table border = 5 bordercolor = blue borderlight = green><br /><Tr> <td align = center><br /><Font face = "Arial, Helvetica, sans-serif" style = "font-size: 9pt"><br /><Strong style = "font-weight: 400"> after this code is added, no script error prompt is displayed! </Strong> </font> </td> </tr><br /></Table> </center><br /><Br><br /><Br><br /><Center><br />& Nbsp; <script language = "JavaScript"></p><p><! -- Hide</p><p>Function goHist ()</p><p>{</p><p>History. go ();</p><p>}</p><p>// --></p><p></Script> </center><br /><Div align = "center"><br /><Center><br /><Table border = "0" cellpadding = "0" cellspacing = "0" style = "border-collapse: collapse "bordercolor =" #111111 "width =" 360 "id =" AutoNumber1 "><br /><Tr><br /><Td><br /><P align = "left"> <span style = "font-size: 9pt"> Add the following code to the & lt; body & gt; region <br><br /><Font color = "# FF0033"> <br><br />& Lt; script language = & quot; JavaScript & quot; & gt; <br><br />& Lt ;! -- Hide <br><br /><Br><br />Function killErrors () {<br><br />Return true; <br><br />} <Br><br /><Br><br />Window. onerror = killErrors; <br><br /><Br><br />// -- & Gt; <br><br />& Lt;/SCRIPT & gt; </font> </span> </td><br /></Tr><br /></Table><br /></Center><br /></Div><br /><Br><br /><Br><br /></Body><br /></Html></p>
Tip: you can modify some code before running

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.