开发者

Does Firefox fire an event when it automatically fills out a login form?

开发者 https://www.devze.com 2023-03-12 10:06 出处:网络
In Firefox (and other browsers), the browser conveniently stores your username and password if you tell it to on a particular domain.

In Firefox (and other browsers), the browser conveniently stores your username and password if you tell it to on a particular domain.

Does it fire an event for this? I'm having trouble working with this. I have a login form set up like follows:

<form action="javascript:;" method="post">
 <input type="text" name="id" value="ID" />
 <input type="text" name="dummy_pass" value="Password" />
 <input type="password" name="pass" style="display: none;" />
</form>

Using jQuery, I hide dummy_pass on focus and show/focus pass. The problem is, for both id and pass fields, they are not automatically filled out, even though the login is stored in FF. If I focus on id and use the dropdown, I can select my saved username. Then, the password field contains开发者_运维百科 the password, although it is not displayed (I can probably come up with a solution for that, though).

Any suggestions?

0

精彩评论

暂无评论...
验证码 换一张
取 消