整合营销服务商

电脑端+手机端+微信端=数据同步管理

免费咨询热线:

catch 块会捕捉到 try 块中的错误

<!DOCTYPE html>
<html>
<head>
<script>
var txt="";
function message()
{
try
  {
  adddlert("Welcome guest!");
  }
catch(err)
  {
  txt="There was an error on this page.\n\n";
  txt+="Error description: " + err.message + "\n\n";
  txt+="Click OK to continue.\n\n";
  alert(txt);
  }
}
</script>
</head>

<body>
<input type="button" value="View message" onclick="message()">
</body>

</html>
了解更多内容:请访问:雨点网络  石家庄网站制     石家庄网站建设  

上一篇:TweenLite.as
下一篇:Throw 语句