3. The Scratchpad tool in Firefox, Tutorial
Learn to use the Scratchpad tool
Part of the Web Developer Tools, the Scratchpad tool allows you to test JavaScript code on a web page through a text editor interface.
You can import a whole .js page and test it, fully or partially (just the selected part), or you can simply write the JavaScript code you want and run it.
You can also Inspect or Display the returned result of the executed code.
- Open ⁄ Close:
- Tools-Web Developer-Scratchpad
- shortcut: Shift + F4
- File: Open
- Execute: Run ⁄Inspect ⁄Display (1st example)
- Write the JavaScript:
- Run (2ndexample)
Video demonstration Firefox Scratchpad tool
3. The Scratchpad tool in Firefox, Tutorial
min | video details |
---|---|
00:11 | OPEN ⁄CLOSE Scratchpad: |
00:11 | open Scratchpad -Tools menu |
00:14 | close Scratchpad -click on 'x' |
00:17 | open Scratchpad -shortcut |
00:21 | USE Scratchpad: |
00:21 | 1stExample: open javascript file |
00:30 | we will dynamically add the Caption 'Table no 1' to the table which has the id='tableone' |
00:45 | Note: the table has no caption |
00:49 | run the js code |
00:50 | caption successfully added |
00:54 | inspect |
01:01 | display |
01:26 | 2ndExample: adding border ⁄changing the background color of a div element |