Advertisement
gayanov

Untitled

Feb 3rd, 2017
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <div class="panel-body">
  2. <div class="col-xs-12 col-sm-12 col-md-12">
  3. <form action="/auth" id="loginForm" method="POST">
  4. <div class="input-group">
  5. <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
  6. <input type="text" name="login" id="login" class="form-control" placeholder="Имя пользователя"/>
  7. </div>
  8. <div class="input-group">
  9. <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
  10. <input type="password" name="password" id="password" class="form-control" placeholder="Ваш пароль"/>
  11. </div>
  12. <p>
  13. <a href="#">Забыли свой пароль?</a></p>
  14. У вас нет аккаунта? <a href="#">Регистрация</a>
  15. </div>
  16. <script>
  17.         $("#loginForm").submit(function(event) {
  18.             // Предотвращаем обычную отправку формы
  19.             event.preventDefault();
  20.             $.post('/auth', {'login':$('#login').val(), 'password' : $('#password').val()},
  21.                     function(data) {
  22.                             $('#result').html(data);
  23.                     });
  24.             });
  25. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement