Html表单标签自动完成="关闭"属性无法在Chrome浏览器

时间:2015-05-08 04:50:08

标签: php html css

我有用户注册表。表单包含用户名和密码字段。 在用户注册时,用户名和密码字段会自动填充值。

我使用过表单" autocomplete"属性,但不适用于Chrome浏览器。

这是我的代码,

<form method="post" action=""  autocomplete="off">
<input type="text" id="first_name" name="first_name">
<input type="text" id="last_name" name="last_name">
<input type="text" id="username_name" name="username_name">
<input type="text" id="password" name="password">

1 个答案:

答案 0 :(得分:3)

根据我的经验,Chrome只会自动填充第一个<input type="password">和之前的内容。所以我补充道:

<input style="display:none">
<input type="password" style="display:none">

<form>的顶部,案件已经解决。

相关问题