<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>JavaScript容错脚本</title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>
</body>
</html>
在网页里加入这样的代码就行了