Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Converting a value to Integer

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 116
    Comment on it

    When the user types a value in an edit box or selects a value from a text-based control, the value is considered a simple group of words and the browser may not be able to identify or categorize what exists in a text-based control. The parsetInt() function is used to check what is in a text-based control. Its syntax is:

    parseInt(Value)
    

    When calling this function, you must provide the argument. If the value is a natural number, parseInt() returns that number. For example, if you call it as

    parseInt("124")
    

    the function will return 124. When program finds a character that is not a digit, it would stop. It would then convert to number the digits found on the left side of the first non-digit character. For example, if you call it as

    parseInt("216PLL")
    

    the function would return 216.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: