..
Try the command for error handling in JavaScript evaluates the statements to run.
Let's see an example of code:
try
{
document.write ("Tthe my name is" + myname);
}
catch (e)
{
document.write ("The variable 'myname' is not defined!");
}
If the instructions that follow try to generate an error code prints the error message below to catch (e).
try
{
document.write ("Tthe my name is" + myname);
}
catch (e)
{
document.write (e.Message);
}
| |
CSS (Course)
Web Design and Accessibility according to W3C CSS and XHTML. Starting from 29 €. |
| |
HTML (Course)
The markup language for the Web from 29 €. |
| |
Javascript (Course)
Complete guide to client-side scripting. From 39 €. |