JavaScript Reference/Javascript Methods/isNaN

Материал из Web эксперт
Перейти к: навигация, поиск

"isNaN()" Example

   <source lang="javascript">
   

<html> <body> <button onclick="alert(isNaN("12.34"));">isNaN False</button> <button onclick="alert(isNaN("Hello"));">isNaN True</button> </body> </html>


     </source>
   
  


"isNaN()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Is the specified string NOT numeric. Returns true or false.

Syntax:

isNaN(param1) Parameters:

   param1   Required; the string to be evaluated.
   
     
     </source>