Previous Example-|-Next Example-|-Return to Chapter Listing
Example 7.13:
Built-in Functions--parseFloat
This page uses a built-in function, parseFloat(form.txtNum.value), to return a floating-point number. Type a number--try typing a decimal number into the first text box,
then click on the button to see the result. You can type in - to make your number negative or you can use "e" to represent exponential values:
These are the scripts we used. First, in the HEAD:
Later in the Web page the function is called from this form:
Previous Example-|-Next Example-|-Return to Chapter Listing