Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Error Try Catch

<p id="error"></p>

<script>
try {
  wrongalert("Welcome guest!");
}
catch(err) {
  document.getElementById("error").innerHTML = err.message;
}
</script>
 
PREVIOUS NEXT
Tagged: #JavaScript #Error #Try #Catch
ADD COMMENT
Topic
Name
1+9 =