Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.arcetri.astro.it/irlab/doc/library/javascript/clientguide/console.htm
Дата изменения: Thu Oct 7 13:13:31 1999 Дата индексирования: Sat Dec 22 14:11:33 2007 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п р п р п р п р п |
javascript:
javascript:
<A HREF="javascript:">Open JavaScript console</A>
javascript typein
, where you can type one-line expressions. You can use this field to assign values to variables, test comparison operators, and perform math operations.
To evaluate an expression:
For example, you could evaluate the following expressions:
alert("hello there") // Displays an alert dialog box
5-2 // Displays "3" in the upper frame
var high=100; var low=45; // Creates two variables
high-low; // Displays 55 in upper frame
Line 64: myVariable is not defined
). For most users, these errors are incomprehensible, and dismissing the dialog box becomes annoying. The only people likely to be interested in the errors are JavaScript developers, testers, and sophisticated users.
You can force JavaScript errors to be displayed only in the JavaScript console. Then, when a JavaScript error occurs, the error message is directed to the console, and no dialog box appears. Since the console is normally not displayed, the user receives no direct indication that a JavaScript error has occurred. If a user or developer wants to view a JavaScript error, they need to open the console.
The text of JavaScript error messages appears the same way whether they are displayed in the console or in the traditional error dialog box.
JavaScript error descriptions are always displayed in English regardless of the locale.
prefs.js
as follows.
Navigator may overwrite your changes if it is running when you edit the preferences.
prefs.js
.<Netscape path>\Users\<user name>
prefs.js
:user_pref("javascript.console.open_on_error", true);
prefs.js
:user_pref("javascript.classic.error_alerts", true);
prefs.js
.Last Updated: 05/27/99 21:21:50