User Id :    Password :      New Member   Forgot Password  
Validate integer value in java script
Description This is simple codesnippet to chech interger value is valid or not   No. of Views     1122
  Rating     0
Author Najmul Hoda   Posted On     23 Aug 2011
Tags Java Script    

Sample Code   Download Code


       Codesnippet to check if a value is integer or not.


function Check()
        alert('Integer value')

        alert('Not an integer value')

function isInteger(s) {
    var i;
    for (i = 0; i < s.length; i++) {
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    // All characters are numbers.
    return true;



About Author

About Author He is a team lead, having 8+ years of experience. He loves writing technical article for .Net developers. Najmul Hoda
No Photo
Country United States
Company BirlaSoft
Home Page

Rate this article

Rating options from poor, fair, good, very good to excelent.  


Write your comment here.
Verification Code