Answers for "input box take 10 digit number jquery"

2

jquery only number allowed to 10 digit

<script type="text/javascript">
  $(document).ready(function() {	
  $("#phone_work").attr("maxlength", "10");
  $("#phone_work").keypress(function(e) {
    var kk = e.which;
    if(kk < 48 || kk > 57)
      e.preventDefault();
  });
});
</script>
Posted by: Guest on October-09-2020
0

on input inset - afetr 5 digits jquery

<input name="number" onkeyup="if (/^[X]{1}[A-Z0-9]{3}[B]{1}[-][0-9]{6}[-][0-9]{2}$/.test(this.value)) this.value = this.value.replace(/^[X]{1}[A-Z0-9]{3}[B]{1}[-][0-9]{6}[-][0-9]{2}$/,'-')">
Posted by: Guest on January-18-2021

Code answers related to "input box take 10 digit number jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language