'parseInt()' Example : parseInt « Javascript Methods « JavaScript Reference

'parseInt()' Example

    
<html>
<body>
<button onclick="alert(parseInt('12.34'));">Number</button>
<button onclick="alert(parseInt('Hello'));">NaN</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'parseInt()' Syntax, Parameters and Note