【发布时间】:2023-03-25 08:42:02
【问题描述】:
我对下拉列表中的 Chrome 自动填充有一个相当恼人的问题。下拉列表选择一个县以添加许可费用。当您自动填写地址时,它会在下拉列表中选择自动填写的县名,然后依次添加许可证费用。我尝试从selCounty 修改下拉列表ID,但没有成功。
根据情况,可能不需要支付许可费,因此我可以看到客户可能在自动填充时无意中选择了此选项。
我查看了与用户名/密码问题相关的类似 SO 问题,并尝试使用隐藏的下拉菜单来选择它,而不是在没有运气的情况下在黑暗中进行野刺。
这是下拉列表代码:
<select id="fakeSelCty" style="display:none"></select>
@Html.DropDownListFor(
x => x.SelectedPermitCountyId,
new SelectList(Model.PermitCounties, "PermitCountyId", "PermitCounty"),
new { @class = "form-control input-sm", id = "selCty" })
autocomplete="off" 的任何建议在 Chrome 中不起作用?
【问题讨论】:
标签: google-chrome html.dropdownlistfor autofill