整合营销服务商

大通彩票电脑端+手机端+微信端=数据同步管理

免费咨询热线:152-3219-8219

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 语句