Html 否';保存密码';任何浏览器提示我的表单
我的表格附在下面,我尝试了很多在其他论坛上找到的东西,但都没有用。我无法让浏览器提示“保存密码”。我哪里做错了。希望有人能帮忙。谢谢Html 否';保存密码';任何浏览器提示我的表单,html,forms,zend-framework,Html,Forms,Zend Framework,我的表格附在下面,我尝试了很多在其他论坛上找到的东西,但都没有用。我无法让浏览器提示“保存密码”。我哪里做错了。希望有人能帮忙。谢谢 <form id="frmlogin" action="/index" method="post" enctype="application/x-www-form-urlencoded" autocomplete="on"> <label id="landing_username" class="required" for="us
<form id="frmlogin" action="/index" method="post" enctype="application/x-www-form-urlencoded" autocomplete="on">
<label id="landing_username" class="required" for="username">Username/Email</label>
<input id="landing_username" name="username" type="text" value="" name="username" />
<label id="landing_password" class="required" for="password">Password</label>
<input id="landing_password" name="password" type="password" value="" name="password" />
<submit id="loginbtn" onclick="LoginFun()" type="submit" name="loginbtn">Login</submit>
</form>
用户名/电子邮件
暗语
登录
试着清理一下HTML,可能会有帮助:
<form id="frmlogin" action="/index" method="post">
<label id="landing_username" class="required" for="username">Username/Email</label>
<input id="username" name="username" type="text" />
<label id="landing_password" class="required" for="password">Password</label>
<input id="password" name="password" type="password" />
<input id="loginbtn" onclick="LoginFun()" type="submit" name="loginbtn" value="Login" />
</form>
用户名/电子邮件
暗语
- 表单属性
默认为enctype
,因此无需指定它application/x-www-form-urlencoded
- 属性的标签
应包含相关输入的
,而不是id
名称
- 元素ID应该是唯一的
- 属性
为密码和用户名定义了两次name
- 默认情况下,
属性为onautocomplete
- 输入值
不是必需的,因此您不需要使用空字符串将其添加到输入中
- 提交按钮应为提交类型的输入
这些更改中的一些只是优化,没有优化代码也可以正常工作,但其他更改(如确保每个标记的唯一id)是修复,即使浏览器正确显示表单,也强烈建议进行修复。尝试清理一下HTML,可能会有帮助:
<form id="frmlogin" action="/index" method="post">
<label id="landing_username" class="required" for="username">Username/Email</label>
<input id="username" name="username" type="text" />
<label id="landing_password" class="required" for="password">Password</label>
<input id="password" name="password" type="password" />
<input id="loginbtn" onclick="LoginFun()" type="submit" name="loginbtn" value="Login" />
</form>
用户名/电子邮件
暗语
- 表单属性
默认为enctype
,因此无需指定它application/x-www-form-urlencoded
- 属性的标签
应包含相关输入的
,而不是id
名称
- 元素ID应该是唯一的
- 属性
为密码和用户名定义了两次name
- 默认情况下,
属性为onautocomplete
- 输入值
不是必需的,因此您不需要使用空字符串将其添加到输入中
- 提交按钮应为提交类型的输入