JavaScript Reference/Javascript Methods/parseInt
"parseInt()" Example
<html>
<body>
<button onclick="alert(parseInt("12.34"));">Number</button>
<button onclick="alert(parseInt("Hello"));">NaN</button>
</body>
</html>
"parseInt()" Syntax, Parameters and Note
Note:
Converts the string to an integer.
Returns an integer if value supplied is numeric or
NaN if value supplied is not numeric.
Syntax:
parseInt(param1)
Parameters:
param1 Required; the string to be evaluated.