Accept numeric input only using JavaScript