August 1999
Intermediate to advanced
1488 pages
72h 53m
English
errorobj.number errorobj.number = number;
The number property associated with the Error object contains the error number of the error. This method is read/write, so you can assign an error number using this property.
Listing 9.48 creates an Error object and then displays the error number.
<html>
<script language="JScript">
<!-- Hide
//Create an Error object
var myError = new Error(45,"A really big error!");
//Display error number associated with the custom error
document.write("The custom error number is ");
document.write(myError.number);
//Hide End -->
</script>
</html>
|
Read now
Unlock full access