我有以下代码:
<dl class="dl-table">
<dt style="width:170px">Current Password:</dt>
<dd>
@Html.Password("CurrentPassword", "")
</dd>
<dt style="width:170px">New Password:</dt>
<dd>
@Html.Password("NewPassword", "")
</dd>
<dt style="width:170px">Confirm New Password:</dt>
<dd>
@Html.Password("ConfirmNewPassword", "")
</dd>
</dl>
但是,出于某种原因,它显示如下:
为什么预先填充?
答案 0 :(得分:1)
尝试设置autocomplete="off"
@Html.Password("ConfirmNewPassword", "", new { autocomplete = "off" } )