JavaScript Error name Property - function does not exist - Javascript DOM

Javascript examples for DOM:Error

Description

JavaScript Error name Property - function does not exist

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
try {/*from   w ww. jav a2 s. c o  m*/
    functionDoesNotExist("hi!");
}
catch(err) {
    document.getElementById("demo").innerHTML = err.name;
}
</script>

</body>
</html>

Related Tutorials