我有一个登录页面,我想在用户首次登录后自动填充用户名和密码字段。所以下次如果他返回登录页面,用户名和密码字段需要自动填写,所以他只需点击登录按钮。
我在上面的字段上启用了自动完成功能,但它在 IE 或 chrome 浏览器中不起作用。
<input type="text" id="userName" autofocus="autofocus" value="" tabindex="1" autocomplete="on">
<input type="password" name="password" id="password" value="" tabindex="2" maxlength="20" autocomplete="on">
最佳答案
您必须将其添加到 <form/>
也在您的页面上。
<form autocomplete="on" ..other attributes>
关于jquery - 如何在浏览器中启用用户名和密码自动填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25825310/