<head runat="server">
<title></title>
<script type="text/javascript">
function Deal() {
try {
form1.submit(); //或其他可以引发错误的代码
} catch (err) {
document.writeln("Error name: " + err.name);
document.writeln("Error message:" + err.message);
}
finally {
alert("some message");
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" id="button1" name="button1" value="button1" onclick="this.disabled=true; Deal();" />
</div>
</form>
</body>
</html>