我怎么能写我的帮助浏览器的自动完成功能的形式? [英] How can I write a form that assists my browser's auto-complete feature?

查看:113
本文介绍了我怎么能写我的帮助浏览器的自动完成功能的形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何Chrome或其他浏览器,确定哪些数据是适当的自动完成到一个特定的表单字段?难道仅仅是基于名称和类型?是否有其他的语义/微观数据标准,我应该知道的,可以给它一个暗示?

How does Chrome, or other browsers, determine what data is appropriate to auto-complete into a particular form field? Is it just based on the name and type? Are there other semantic / microdata standards I should be aware of that can give it a hint?

我似乎记得读书的表单字段提示镀铬的标准,但我找不到那篇文章了。

I seem to recall reading a standard of form field hints for chrome, but I can't find that article anymore.

推荐答案

HTML5 <一个href=\"http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#autofilling-form-controls:-the-autocomplete-attribute\"相对=nofollow>定义:

在自动填充字段名称是,用户代理应该尝试使用试探法来确定最合适的值,为用户提供,例如基于元素的名称值,在文档的DOM元素,形式存在哪些其它领域,等等的位置。

When the autofill field name is "on", the user agent should attempt to use heuristics to determine the most appropriate values to offer the user, e.g. based on the element's name value, the position of the element in the document's DOM, what other fields exist in the form, and so forth.

自动填充字段名称 定义,可以用作自动完成属性值,例如:


  • 名称的全名

  • 昵称的昵称,网名等。

  • 组织标题的职位

  • BDAY 的生日

  • 电话的电话号码

  • ...

  • name for the full name
  • nickname for the nickname, screen name, etc.
  • organization-title for the job title
  • bday for the birthday
  • tel for the telephone number

更新:这些的自动填充字段名称的那样的不可以使其对HTML5 REC然而,他们的再次/ HTML还是5.1(WD)的一部分,目前也草案href=\"http://www.w3.org/html/wg/drafts/html/master/forms.html#autofill-field\" rel=\"nofollow\">一部分。 )

(Update: These autofill field names did not make it to the HTML5 REC. However, they are again/still part of HTML 5.1 (WD), and currently also part of the Editor’s Draft.)

还有 RFC 3106这对于电子商务定义值。

这篇关于我怎么能写我的帮助浏览器的自动完成功能的形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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