title: HTML allow only number without dot (.) in <input type="number">
body: <p><strong>HTML</strong></p>
  <pre><code>&lt;input type=&quot;number&quot; required=&quot;&quot; pattern=&quot;\d*&quot; id=&quot;mobile&quot;&gt;
  </code></pre>
  <p><strong>jQuery</strong></p>
  <pre><code>var letters = /^[0-9]+$/;
  var mobile_backup=&quot;&quot;;
  $(document).ready(function(){
      $(&quot;#mobile&quot;).on(&quot;input&quot;, function(){
          var mobile_value=$(this).val();
          if(mobile_value===&quot;&quot;)
          {
              mobile_backup=mobile_value;
          }
          else if(mobile_value.match(letters)===null){
              $(this).val(mobile_backup);
          }
          else{
              mobile_backup=mobile_value;
          }
      });
  });
  </code></pre>
  <p>Current solution works in all devices (desktop, mobile, tablet).
  Is there any efficient approach available such that it works in all devices?</p>
  <p>I know I can use a pattern for number. But I don't want an alert. I just want to allow the numbers without a dot.</p>