是否有在所有现代浏览器很好的自动完成功能的HTML表单域的命名约定? [英] Is there a naming convention for HTML form fields for good auto completion across all modern browsers?
问题描述
是否有表单域的命名约定?对于哪些领域的Chrome,IE,火狐寻找什么?我的意思是,我为人人,或至少大部分现代浏览器。
我偶然发现:
- http://wonderfullyflawed.com/2009/02/17/rails-表单的微
- http://acidmartin.word$p$pss.com/2008/10/28/using-ecml-11-to-make-website-forms-compatible-with-google-toobar-autofill-and-wand/ - >谈论 http://www.ietf.org/rfc/rfc3106.txt
- HTML表单命名约定的名称
- Form在浏览器中使用的个人数据自动填充字段名(Safari浏览器,Opera)的
例如。在ECML方法使用这样的名称:
描述字段名称
-------------------------------------------------- --------
船舶所有权Ecom_ShipTo_Postal_Name_ preFIX
舰名Ecom_ShipTo_Postal_Name_First
船中间名Ecom_ShipTo_Postal_Name_Middle
船姓氏Ecom_ShipTo_Postal_Name_Last用户ID Ecom_User_ID
用户密码Ecom_User_Password
但那些电信公司_...表单字段出现奇怪了吧?
我知道IE浏览器只和专有属性 VCARD_NAME =vCard.xyz
(当然),但它是一个无效的HTML属性。
或者是最好的射手,写场像@F最常见的方式。 B.建议在<一个href=\"http://stackoverflow.com/questions/1027462/form-field-names-used-by-personal-data-auto-fill-in-browsers-safari-opera/1348601#1348601\">Form在浏览器(Safari浏览器,Opera)的使用个人数据自动填充字段名
小更新(2015年7月21日) - 只是偶然发现了这个的谷歌开发者博客帖子里面提到的 HTML WHATWG 作为自动填充功能:
https://html.spec.whatwg.org/multipage/forms。 HTML#自动填充
块引用>
解决方案
您似乎
问题是,它的谷歌工具栏和棒的工作成功地填写表格。鉴于互联网的范围,工具栏必须具备的吨的冗余。
所以,只要你保持你的表单字段的 semanticly名为,表单自动填充应
ECML是电子商务建模语言。 电信公司_
只是代表了电子商务。如果你需要卖东西,使用该命名约定。
Is there a naming convention for form fields? For what fields do Chrome, IE, Firefox look for? I mean, one for all, or at least most of the modern browsers.
I stumbled upon:
- http://wonderfullyflawed.com/2009/02/17/rails-forms-microformat
- http://acidmartin.wordpress.com/2008/10/28/using-ecml-11-to-make-website-forms-compatible-with-google-toobar-autofill-and-wand/ -> talking about http://www.ietf.org/rfc/rfc3106.txt
- Names of HTML form naming conventions
- Form field names used by personal data auto-fill in browsers (Safari, Opera)
e.g. the ECML approach uses such names:
Description Field name
----------------------------------------------------------
ship to title Ecom_ShipTo_Postal_Name_Prefix
ship to first name Ecom_ShipTo_Postal_Name_First
ship to middle name Ecom_ShipTo_Postal_Name_Middle
ship to last name Ecom_ShipTo_Postal_Name_Last
user ID Ecom_User_ID
user password Ecom_User_Password
But those "Ecom_..." form fields appear odd to me?
I know about the IE-only and proprietary (of course) attribute VCARD_NAME="vCard.xyz"
, but it's an invalid html attribute.
Or is the best shot, to write the fields in the most common way like @F. B. suggests at Form field names used by personal data auto-fill in browsers (Safari, Opera)
Small Update (2015-07-21) - just stumbled upon this Google Developer Blog post which mentions the WHATWG HTML specs for Autofill:
You seem to have linked to the answers. If you are not using high-level frameworks like CakePHP or Ruby on Rails, though, the first and third links do not apply.
The thing is, it's Google Toolbar and Wand's job to fill out forms successfully. Given the scope of the internet, the toolbar must have tons of redundancy.
Therefore, as long as you keep your form fields semanticly named, the form should autofill.
ECML is E-Commerce Modeling Language. Ecom_
simply stands for E-Commerce. If you need to sell stuff, use that naming convention.
这篇关于是否有在所有现代浏览器很好的自动完成功能的HTML表单域的命名约定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!