Created
          February 21, 2018 18:00 
        
      - 
      
- 
        Save zubayerahamed/3f736185270330341d3df8e459a7b985 to your computer and use it in GitHub Desktop. 
    How to allow only numeric (0-9) in HTML inputbox using jQuery?
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $('#smsAmount').on('keydown', '#child', function(e){-1!==$.inArray(e.keyCode,[46,8,9,27,13,110,190])||(/65|67|86|88/.test(e.keyCode)&&(e.ctrlKey===true||e.metaKey===true))&&(!0===e.ctrlKey||!0===e.metaKey)||35<=e.keyCode&&40>=e.keyCode||(e.shiftKey||48>e.keyCode||57<e.keyCode)&&(96>e.keyCode||105<e.keyCode)&&e.preventDefault()}); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment