the shy_The try...catch statement

更新时间:2016-05-02    来源:网页配色    手机版     字体:

【www.bbyears.com--网页配色】

The try...catch statement


<script type="text/javascript教程">
var txt="";
function message()
{
try
  {
  adddlert("Welcome guest!");
  }
catch(err)
  {
  txt="There was an error on this page.nn";
  txt+="Error description: " + err.description + "nn";
  txt+="Click OK to continue.nn";
  alert(txt);
  }
}
</script>

本文来源:http://www.bbyears.com/wangyezhizuo/23566.html

猜你感兴趣