Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<!--
  Simple Login Form
  ** Used with jQuery
-->
<form id='login'>
  <input type='text'     placeholder='username' id='login_name' />
  <input type='password' placeholder='password' id='login_pwd' />
  <input type='submit'   value='Login' />
</form>
<script>
  var logins = [
    ['login', 'pwd']
  ];
  $('#login').submit(function(e) {
    e.preventDefault();
    for(login in logins) {
      if($('#login_name').val() == login[0] && $('#login_pwd').val() == login[1]) {
        loginSuccess();
      }
    }
  });
  function loginSuccess() {
    // If successfully logged in this function will be called
  }
</script>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers