HTML and CSS Reference
In-Depth Information
For example, if you are checking to see if two expressions are equal, you should use the
== equality operator, not the = assignment operator.
2.5 Debugging Tools
To see your where errors have occurred in your JavaScript programs, modern browsers
provide an error console window.
Table 2.2 Browser Error Console
How to Invoke Error Console
Internet Explorer
Double-click the little yellow triangle in the left corner
Tools/Error Console
Develop/Show Error Console
Tools/Advanced/Error Console script Options/
2.5.1 Firefox
Error Console. You an b ing up the ror conso e for F fox by going to
“Tools/Error Console” The Console displays the lines containing the errors. Leave the
console open and watch your errors build up. There is a “Clear” option to refresh the
error console window. The following JavaScript program contains an error that will be
displayed in the Error Console window as shown in Figure 2.4.
<title>First JavaScript Sample</title>
<body bgcolor="lavender">
<font size="+2">
<script type = "text/javascript">
document.writeln("<h2>Welcome to the JavaScript World!</h2>);
// Bug in line2: Missing double quote!!
This is just plain old HTML stuff.
Search WWH ::

Custom Search