让Chrome和Firefox记住密码

问题描述:

我有一个登录表单,重定向到一个php脚本,然后检查数据库,如果用户注册和所有的好东西,我想要做的就是我想要的Firefox或铬记得用户名和密码屁股发生在所有其他网页上。
这里是我的代码:
让Chrome和Firefox记住密码

<form id="loginForm" action="../php/login.php" method="post"> 
      <table> 
       <tr> 
        <td><label for="user">Username :</label></td> 
        <td><input name="user" id="user" type="text" /></td>           
       </tr> 
       <tr> 
        <td><label for="password">Password :</label></td> 
        <td><input name="password" id="password" type="password" /></td> 
       </tr> 
       <tr> 
        <td></td> 
        <td id="subCont"><input id="submit" type="submit" value="Login"></td> 
       </tr> 
      </table> 
     </form> 

而且我将要处理的所有信息使用jQuery的Ajax方法

var form = $('#loginForm');    

      form.on('submit',function(e){ 
       e.preventDefault(); 
       $this = $(this); 
       $.ajax({ 
        type : 'post', 
        url : 'php/login.php', 
        data : $this.serialize(), 
        dataType : 'json', 
        success : function(r){ 

        }, 
        error : function(r){ 
         window.alert(r.Message); 
        } 
       }); 
      }); 

记住用户名和密码是在用户的浏览器的选项,而不是你可以控制的东西。

+0

是的,但有些网站提供的功能,我怎么能做到这一点? – 2012-07-16 16:48:25

+0

@IsaacGonzalez你有一个例子吗?这可能是你的浏览器,而不是网站。 – Dunhamzzz 2012-07-16 16:50:09

+0

那么每当我想在这里输入到*,浏览器记得我的用户名和密码,也Facebook记得他们 – 2012-07-16 16:51:26