Is it possible to disable autocomplete?

2019-06-21 20:22发布

I know i shouldnt do it but it may be easier then explaining to the clients that you should do it through the browser. They have a public computer and a server running on the machine in an admin account (the code i am writing). They want people to enter their information but they dont want someone pressing down on the email input box to display ppls email address. Is there a way i can disable this through code in IE? (i believe they are using 6 but they may use 7 or 8).

2条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-06-21 20:48

Use the non-standard autocomplete attribute:

autocomplete="off"

Works in all modern browsers. Will break HTML 4 validation, though. No way around that. Will be valid in HTML 5.

Reference:

查看更多
Evening l夕情丶
3楼-- · 2019-06-21 20:48
<input name="name" autocomplete="off">
查看更多
登录 后发表回答