SHARE
TWEET

Untitled

a guest Mar 14th, 2019 149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div data-role="content">
  2.  
  3.         <form id="loginForm">
  4.             <div data-role="fieldcontain" class="ui-field-contain ui-body ui-br">
  5.                 <label for="username">Username:</label> <input type="text"
  6.                     name="username" id="username" value=""   maxlength="8" /> <label for="password">Password:</label>
  7.                 <input type="password" name="password" id="password" value="" /> <label
  8.                     for="dob">Date of birth:</label> <input type="password"
  9.                     type="password" name="dob" id="dob" value="" />
  10.             </div>
  11.             <div >
  12.                 <fieldset class="ui-grid-a" >
  13.                     <div class="ui-block-a" >
  14.                         <input type="submit" data-role="button" value="Login"
  15.                             id="submitButton">
  16.                     </div>
  17.                     <div class="ui-block-b">
  18.                         <input type="reset" data-role="button" value="Cancel"
  19.                             id="cancelButton">
  20.                     </div>
  21.  
  22.                 </fieldset>
  23.             </div>
  24.         </form>
  25.  
  26.     </div>
  27.  
  28.     <script type="text/javascript">
  29.  
  30.     </script>
  31.  
  32.     <script type="text/javascript">
  33.         $("#username").live('keydown', function (event)
  34.         {
  35.  
  36.             if ((event.keyCode.length>8))
  37.             {
  38.                 event.preventDefault();
  39.             }
  40.  
  41.         });
  42.  
  43.     </script>
  44.    
  45. <input type="text" name="username" id="username" value=""  maxlength="8" />
  46.    
  47. <input type="text" name="usrname" maxlength="8" />
  48.    
  49. $("#username").live('keydown', function (event)
  50.  {
  51.         var $this = $(this);
  52.         if($this.val().length > 8){
  53.             $this.val($this.val().substr(0, 8));    
  54.             }      
  55. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top