html输入框去除记忆功能

自动完成功能,只需把AUTOCOMPLETE设为off即可,如: 

1:整个表单禁止自动完成

<FORM method=post action="submit.asp" AUTOCOMPLETE="OFF">

2:禁止文本框自动完成

<input type="text" name="creditcard" maxlength="16" AUTOCOMPLETE="OFF">

3:在脚本中禁止自动完成

function init()
{
    element.setAttribute("AutoComplete", "off");
}

 

posted @ 2020-12-18 13:18  酒醉后的疯言疯语  阅读(340)  评论(0)    收藏  举报