control what user types in a textfield - Javascript jQuery

Javascript examples for jQuery:Text

Description

control what user types in a textfield

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>  Nitish Dhar</title> 
 </head> //from w w  w.java2 s  .  c  o m
 <body translate="no"> 
  <script src="https://code.jquery.com/jquery-1.10.0.min.js"></script> 
  <script src="https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.js"></script> 
  <h1>Regex Input</h1> 
  <input type="text" name="regexInput" id="regex"> 
  <script>
      $(document).ready(function() {
                  $('#regex').inputmask('9-a{1,3}9{1,3}');
});
    
      </script>  
 </body>
</html>

Related Tutorials