How can I get browser to prompt to save password?

前端 未结 20 1252
面向向阳花
面向向阳花 2020-11-22 16:20

Hey, I\'m working on a web app that has a login dialog that works like this:

  1. User clicks \"login\"
  2. Login form HTML is loaded with AJAX and displayed i
相关标签:
20条回答
  • 2020-11-22 16:54

    Using a cookie would probably be the best way to do this.

    You could have a checkbox for 'Remember me?' and have the form create a cookie to store the //user's login// info. EDIT: User Session Information

    To create a cookie, you'll need to process the login form with PHP.

    0 讨论(0)
  • 2020-11-22 16:55

    add a bit more information to @Michal Roharik 's answer.

    if your ajax call will return a return url, you should use jquery to change the form action attribute to that url before calling form.submit

    ex.

    $(form).attr('action', ReturnPath);
    form.submitted = false;
    form.submit(); 
    
    0 讨论(0)
提交回复
热议问题