在文本框中删除自动完成 [英] Remove auto complete on text box

查看:139
本文介绍了在文本框中删除自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的网页上几个文本框,并发现它很烦人的自动完成功能。有没有办法从我的网站删除此?

I have a few text boxes on my page and find it very annoying the auto complete functionality. Is there any way to remove this from my site?

推荐答案

由于HTML 5,自动完成是一个形式/输入属性通过所有主要浏览器支载。

Auto Complete

As of HTML 5, the auto complete is a form / input Attribute suported by all major browsers.

<form name="form1" id="form1" method="post" autocomplete="off" action="#">

此外,在这里看到有关其使用的一些详细信息:

Also, see here some more information about its usage:

  • W3C cheatsheet
  • MDN
  • MSDN

如果你是preparing一个Web应用程序或任何其他智能手机友好的网页,你可能有兴趣知道如何:禁用自动完成,Autocapitalize和自动更正

If you are preparing an web application or any other Smartphone friendly web page, you might be interested in knowing how to: Disable Autocomplete, Autocapitalize, and Autocorrect.

<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />

<textarea autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>

这篇关于在文本框中删除自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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