Debugging JavaScript errors
Author:Eve Cole
Update Time:2010-08-08 09:43:28
<script type="text/javascript">
view sourcePRint?1 function myerror(_message,_url,_line) {
view sourceprint?1 alert("Error message: " + _message +"nWrong URI: " + _url +"nWrong number of lines: " + _line );
show sourceview sourceprint?1 return true; //Shield system events
show sourceview sourceprint?1 }
show sourceview sourceprint?1 //Bind error event
show sourceview sourceprint?1 window.onerror = myerror;
show sourceview sourceprint?1 //Trigger error example:
show sourceview sourceprint?1 window,onload = test;
show sourceview sourceprint?