最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Prevent browsers from auto-filling form fields - Stack Overflow

programmeradmin2浏览0评论

I have tried to find a way to prevent browsers (mostly FF) to prevent auto-filling of my form. I don't mine auto plete, as they type in values it offers suggestions. But when I load a form in FF it auto fills the form with the previous values. But I want to always have the fields be blank on load.

I have tried using autoplete="off" in the tag, but that does not work. Are there any solutions to this? I have looked for other questions and they all say to use that attribute, but it does not work for auto filling, it does for auto plete. Could I use JS/jQuery to do this?

I have tried to find a way to prevent browsers (mostly FF) to prevent auto-filling of my form. I don't mine auto plete, as they type in values it offers suggestions. But when I load a form in FF it auto fills the form with the previous values. But I want to always have the fields be blank on load.

I have tried using autoplete="off" in the tag, but that does not work. Are there any solutions to this? I have looked for other questions and they all say to use that attribute, but it does not work for auto filling, it does for auto plete. Could I use JS/jQuery to do this?

Share Improve this question asked Jul 17, 2012 at 19:40 skiftskift 1,0272 gold badges16 silver badges27 bronze badges 2
  • 2 Possible duplicate: stackoverflow./questions/2530/… – Anirudh Ramanathan Commented Jul 17, 2012 at 19:44
  • I guess he is happy with autoplete - if I understood him correctly. But then I don't understand why would his browser auto-fill the previous values on page load. Are you sure there isn't any plugin/extension thats doing this ? – CodeExpress Commented Jul 17, 2012 at 19:47
Add a ment  | 

2 Answers 2

Reset to default 14

try this might work for you set autoplete="off"

<input type="text" autoplete="off" />

check : How to Turn Off Form Autopletion

New versions of Chrome and Mozilla don't recognize autoplete="off" or autoplete="false". I solved autoplete issue using this js solution

发布评论

评论列表(0)

  1. 暂无评论