script.js 781 B

123456789101112131415161718192021222324252627
  1. $(document).ready(function(){
  2. $('.pass_show').append('<span class="ptxt">Показать</span>');
  3. $('.ptxt').on('mousedown', function(){
  4. $(this).prev().attr('type', function(index, attr){return 'text';})
  5. });
  6. $('.ptxt').on('mouseup', function(){
  7. $(this).prev().attr('type', function(index, attr){return 'password';})
  8. });
  9. });
  10. $("#signinsubmitform").submit(function(event){
  11. //alert("alert");
  12. var isValid = true;
  13. // do all your validation if need here
  14. if (document.getElementById('password').value != document.getElementById('password-repeat').value) {
  15. isValid = false;
  16. }
  17. if (!isValid) {
  18. event.preventDefault();
  19. document.getElementById("errmsg").innerHTML = "Введеные пароли не совпадают";
  20. }
  21. });