Created
April 2, 2012 19:47
-
-
Save h4/2286706 to your computer and use it in GitHub Desktop.
Обработка исключений
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
var txt=""; | |
function message() { | |
try { | |
adddlert("Welcome guest!"); | |
} | |
catch(err) { | |
txt="Ошибка на странице.\n\n"; | |
txt+="Описание ошибки: " + err.description + "\n\n"; | |
txt+="Щелкните по кнопке OK, чтобы продолжить.\n\n"; | |
alert(txt); | |
} | |
} | |
</script> | |
</head> | |
<body> | |
<input type="button" value="Просмотреть сообщение" onclick="message()" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment