如何选择通过code禁用浏览器文本输入框自动填写? [英] How to disable the autofill in browser text inputs selectively via code?

查看:150
本文介绍了如何选择通过code禁用浏览器文本输入框自动填写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能使用code选择性地禁用文本字段的自动填充功能?

Is it possible to selectively disable the autofill feature in text fields using code?

我发展在ASP.Net AJAX我的自定义code在数据库中搜索的建议,我想prevent出现浏览器的建议,当用户开始在文本框中键入

I'm developing my custom code in ASP.Net AJAX to search for the suggestion in the database and I would like to prevent the browser suggestions from appearing when the user starts typing in the textbox.

我在寻找,在最流行的浏览器的解决方案(IE 7和8,火狐,Safari和Chrome)。它是确定的,如果解决办法是在Javascript。

I'm looking for a solution that works in the most modern browsers (IE 7 & 8, Firefox, Safari and Chrome). It's is ok if the workaround is in Javascript.

推荐答案

看自动完成HTML属性(在形式或输入标签)。

Look at the autocomplete HTML attribute (on form or input tags).

<form [...] autocomplete="off"> [...] </form>

W3C> autocomplete属性

这篇关于如何选择通过code禁用浏览器文本输入框自动填写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆