If you type the javascript: URL method into the location box on a Netscape 4 browser and then press return, the web browser will display a debugging console window that gives you some helpful messages about what is happening in your script. It can certainly speed up the debugging process when you are trying to trace a fault.
You can type short pieces of JavaScript source code into the type-in box and press return and the results will be executed in console.
For example, to see the value of some mathematical constants, you type these lines into the location box:
Math.PI
Math.LOG10
Number.MAX_VALUE
A small bug in the console requires that the first item be triggered with two carriage returns. For some reason the console eats the first message and then spits it out with the second. Everything is fine after that.
| Prev | Home | Next |
| JavaScript Bookmark URLs | Up | JavaScript Document Source URL |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||