日期:2014-05-16  浏览次数:20378 次

获取JS异常信息(文件名,行数)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>A</title>
		<meta name="generator" content="Studio 3 http://aptana.com/">
		<meta name="author" content="Administrator">
		<!-- Date: 2011-08-07 -->
		<script type="text/javascript" language="JavaScript">
			window.onerror = function(meg,url,link) {
				alert("message:"+meg+";url:"+url+";link:"+link); 
			};
			throw new Error("自定义异常");
		</script>
	</head>
	<body>
	</body>
</html>
?