|
Custom JavaScript Verification
|
|
|
| 1) | Turn on script error reporting. This is done in Internet Explorer by clicking Tools | Internet Options | Advanced. Under the Advanced tab go to the Browsing section and check Display a notification about every script error. This is extremely useful in alerting you to mistakes in your code.
|
| 2) | Use the "alert( )" function. If you are unsure what certain values are at certain points in your code, you can print them out to the screen by using the "alert( )" function. For example:
|
| Example: parseFloat(document.mainform["q1"].value) + parseFloat(document.mainform["q2"].value)
|