[Javascript] is numberic??

Mckinney, Lori K lkmckinn at ingr.com
Mon Jun 17 15:31:21 CDT 2002


parseInt will give you back digits as long as it can.  In your case, you would get 11 for the parseInt value which is a number so isNaN is false.  

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsmthparseint.asp

The example from this reference is as follows:

parseInt("12abc")   // Returns 12.

>
>I have tried the
>
>alert ( isNaN(parseInt(window.document.myform.RMList.value)) );
>
>to figure this out.
>
>but it will allow me to enter this "11dd44"
>this is not a number
>
>so what gives?



More information about the Javascript mailing list