Java Reference
In-Depth Information
4.
Click the Sources tab, remove the breakpoint, and then click the Continue icon. You see the
results of your actions: Where the 1*1 times table result should be, the text you changed on
the fly has been inserted.
Note This alteration does not change your actual HTML source file.
The console can also evaluate conditions. Set a breakpoint on line 20 and reload the page. Leave
execution stopped at the breakpoint, and Step Into the for loop's condition.
Go to the Console, type the following, and press Enter:
timesTable <= 12
Because this is the first time the loop has been run, as shown in Figure 18-12, timesTable is equal
to 1 so the condition timesTable <= 12 evaluates to true .
figure 18-12  
You can also use the console to access properties of the BOM and DOM. For example, if you type
location.href into the console and press Enter, it will tell you the web page's URL.
Note You can evaluate any JavaScript in the console, and it executes within
the scope of the page and/or breakpoint. This makes the console an extremely
powerful tool.
Search WWH ::




Custom Search