Acrobat JavaScript Tools
Exercise: Working with the JavaScript Console
2
Trying out the JavaScript Console
1.
Select
Advanced > JavaScript > Debugger
(Ctrl+j) to open the JavaScript debugger.
2.
In the debugger, select
Console
from the
View
window.
The console window should appear, as shown in
Figure 2.2.
F
IGURE
2.2
Console window in the JavaScript Debugger
3.
Click
Clear
(the trash can icon), located at the bottom right of the console, to delete any
contents that appear in the window.
4.
Type the following code into the console:
var jsNum = 10;
5.
With the mouse cursor positioned somewhere in this line of code, press
Enter
on the
numeric keypad or
Ctrl+Enter
on the regular keyboard to evaluate the code. You should
see the results shown in
Figure 2.3 below.
Acrobat JavaScript Scripting Guide
35