title: JavaScript function to validate an integer value
body: <p>I'm building a shopping cart and I would like to use a JavaScript function to validate user input when entering the quantity value in the quantity text input. I would like to allow the entering of integer values only (no floats, no other characters). </p>
  
  <p>I know that I can apply this function using onKeyUp event and also I found isNaN() function, but it returns true even for floats (which is not ok). </p>
  
  <p>Can you guys help me out with this one?</p>
  
  <p>Thanks.</p>