Your location:Tech News>News>Script>Sharing the code input box PassWord

Latest News

Sharing the code input box PassWord

Author:fsadmin

Views:

  function hiddenPass (event)

  {

  var password0 = document.getElementById ( "password0");

  var password1 = document.getElementById ( "password1");

  if (event.keyCode == 13)

  {

  }

  var keycode;

  if (window.event)

  {// IE

  keycode = event.keyCode

  } Else if (event.which)

  {// Netscape / Firefox / Opera

  keycode = event.which

  }

  var keychar = String.fromCharCode (keycode);

  password1.value = password1.value + keychar;

  password1.value = password1.value.substring (0,

  password0.length);} function clearPass ()

  {

  $ ( "# Password0").val ( "");

  $ ( "# Password1").val ( "");

  }

  

  •   

      

      onfocus = "javascript: clearPass ();"

      onkeyup = "this.value = this.value.replace (/ https: // www.jb51.net / article / g, ''*'') "

      onkeypress = "javascript: hiddenPass (event);" />

      

      

    Recommend article

    Relate article