More Related Content
More from karan chanana (10)
JavaScript Errors - Throw and Try Catch Errors
- 1. JavaScript Errors - Throw and Try
<!DOCTYPE html>
<html>
<head>
<script>
var txt="";
function message()
{
try
{
adddlert("Welcome guest!");
}
catch(err)
{
txt="There was an error on this page.nn";
txt+="Error description: " + err.message + "nn";
txt+="Click OK to continue.nn";
alert(txt);
}
}
</script>
</head>
<body>