Using the following coding
When I check the value of "cThisVal" and see the response is NaN not a number.
I then test to see if it a number like this.
So am I to assume that "parsefloat " makes cThisValue a number even though it is not. Also if it evaluated as a number, what is the value?
Code:
<input type text id="myField" value ="" /> var cThisVal = parseFloat( document.getElementById("myField").value)
I then test to see if it a number like this.
Code:
typeof cThisVal == "number" evaluates to false typeof document.getElementById("myField").value == "number" evaluates to true
Comment