Slogbox
Search & Comment
  

 
 
Slog about isNumeric function javascript   
Comments    
 
Your name

* Please enter your name

Your comment

* Please enter your comment

Notify me on replies to:

*Please enter your email

*Please enter a valid email

 
 

isNumeric function javascript by
Now
isNumeric function javascript by Leblon
This is a simple isNumeric function for javascript, it checks if a string consists only of numeric digits (and dot):


function IsNumeric(sText)
{
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;

for (i = 0; i < sText.length && IsNumber == true; i++)
{
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1)
{
IsNumber = false;
}
}
return IsNumber;
}
April 7, 2008 | 12:12 am | Report abuse | Reply

Agrega tu comentario


 

 



 
Semantic refine:
no match


Searching...



Ver resultados en otros idiomas
   
  
My slogs
 
Your email:
 
Wait
Add your comment
Thank you for helping us improve the quality of this site.
Reply    
 
Your name

* Please enter your name

Your comment

* Please enter your comment

Notify me on replies to:

*Please enter your email

*Please enter a valid email

 
*Please enter your name
isNumeric function javascript by
*Please enter your email
*Please enter a valid email
Notify me on replies to 
 
Español   |   English   |   Português   |   Русский   |   Contact us
All opinions expressed here belong to the authors and do not necessarily reflect the opinions of Slogbox.com