vcard_name 属性如何工作:输入字段?

发布于 2024-12-25 14:17:09 字数 333 浏览 0 评论 0原文

谁能解释一下 (IE) vcard_name 属性如何应用于 HTML 输入字段(见下文)?

我已阅读 Microsoft 的文档,但仍不清楚。在上面的示例中,包含 vcard_name 属性是否意味着自动完成建议将专门从配置文件助手中提取?或者是否会从配置文件助理标准自动完成存储中提取建议?

另外,包含 vcard_name 属性是否意味着提交表单时用户的输入将保存在配置文件助手中?

Can anyone explain how the (IE) vcard_name attribute works as applied to HTML input fields (see below)?

<input name="foo" vcard_name="bar">

I've read Microsoft's documentation but am still unclear. In the example above, does the inclusion of the vcard_name attribute mean that AutoComplete suggestions will be drawn exclusively from the Profile Assistant? Or will suggestions be drawn from both the Profile Assistant and the standard autocompletion store?

Also, does the inclusion of the vcard_name attribute mean that the user's input will be saved in the Profile Assistant when the form is submitted?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

森林迷了鹿 2025-01-01 14:17:09

希望这会对您有所帮助。
谢谢

工作原理(基本)

当您在表单中输入信息并提交时,Internet Explorer 会设置所谓的 vCard。该功能如此成功的原因是 Web 作者倾向于对跨页面的许多表单元素使用相同的 NAME 属性。

例如,我敢打赌您已经填写了大量询问您姓名的表格。请允许我演示一下。在下面的文本框中输入您姓名的前几个字母。如果您使用 IE 5.0 或更高版本,我敢打赌您的名字会出现作为您可以做出的选择。也可以在电子邮件信箱中尝试一下。我敢打赌,您会选择接收电子邮件。它不会对每个人都有效,但我敢打赌我能理解你们中的大多数人:

如果它对您有用,并且我敢打赌它确实有效,您可能想知道我如何知道每个项目都会出现。好吧,首先,这是上面表格中的代码:

<FORM>
Name: <INPUT TYPE="text" NAME="name">
E-mail: <INPUT TYPE="text" NAME="email">
</FORM>

NAME 属性起到了作用。我基本上猜测,您在某个时间、某个地方填写了一张表格,要求您提供姓名和电子邮件地址。另外,我猜测该表单使用了 NAME 属性“name”和“email”。它们很常见。

如果成功,那么您的系统上就会有几个名为“VCARD_NAME”和“VCARD_EMAIL”的 vCard。当您填写其他表格并提交后,该卡就已创建。现在,从那时起,每当您遇到包含 NAME 属性设置为“姓名”或“电子邮件”的元素的表单时,都会向您建议该 vCard 中的文本。

让我尝试再次证明这一点。下面的表单与上面的表单完全相同,只是第一个文本框的 NAME 属性设置为“griswald”,第二个文本框设置为“ookook”。继续,尝试输入您的姓名和电子邮件。自动完成功能不会为您提供任何帮助。

您没有获得任何帮助,因为您的计算机上没有 VCARD_GRISWALD 或 VCARD_OOKOOK。幸运的是,我没有给你提交表格的机会,否则你就有机会了。

Hope this will help you.
Thanks

How It Works (Basically)

When you enter information into a form and submit it, Internet Explorer sets up what's known as a vCard. The reason the function is so successful is that Web authors tend to use the same NAME attributes for many form elements across pages.

For instance, I'll bet you've filled out a ton of forms that ask for your name. Allow me to demonstrate. Type the first few letters of your name in the text box just below. If you're using IE 5.0 or above, I'll bet your name appears as a choice you can make. Try it in the e-mail box, too. I'll bet you get your e-mail as a choice. It won't work for everyone, but I'll bet I get the majority of you:

If it worked for you, and I'll bet it did, you're probably wondering how I knew each item would come up. Well, first off, here's the code from the form above:

<FORM>
Name: <INPUT TYPE="text" NAME="name">
E-mail: <INPUT TYPE="text" NAME="email">
</FORM>

It's the NAME attribute that does the trick. I'm basically making a guess that sometime, somewhere, you filled out a form that asked for your name and e-mail address. In addition, I am guessing that the form used the NAME attributes "name" and "email". They are very common.

If it worked, then you have a couple of vCards on your system named "VCARD_NAME" and "VCARD_EMAIL". When you filled out the other form and submitted it, the card was created. Now, from that point on, whenever you run into a form that has an element with a NAME attribute set to "name" or "email," the text from that vCard will be suggested to you.

Let me attempt to prove that point again. Below is a form that looks exactly like the one above, except the first text box has its NAME attribute set to "griswald" and the second set to "ookook". Go ahead, try to put your name and email in. You'll get no help from AutoComplete.

You didn't get any help because you don't have VCARD_GRISWALD or VCARD_OOKOOK on your computer. Luckily, I didn't give you the opportunity to submit the form, or you would have.

半边脸i 2025-01-01 14:17:09

基本上,*vcard_name* 属性覆盖name 属性。它告诉浏览器使用作为架构传递的 vcard_name 值来查找自动完成建议。如果未提供,则使用 name 属性。

指定用于自动完成框的 vCard 类型。设置
vCard_name 属性的值导致
自动完成窗口仅取决于此属性的值,
无论名称属性的值如何。如果值
未指定 vCard_name 属性时,其内容
自动完成窗口取决于名称属性的值。
来源:http://help.dottoro.com/lhwgvcmt.php

Basically, the *vcard_name* attribute overrides the name attribute. It tells the browser to use the vcard_name value passed as the schema to look for AutoComplete suggestions. If this is not provided, the name attribute is used.

Specifies the vCard type to use for the Autocomplete box. Setting the
value of the vCard_name attribute causes the contents of the
Autocomplete window to depend on the value of this attribute only,
regardless of the value of the name attribute. If the value of the
vCard_name attribute is not specified, the contents of the
Autocomplete window depend on the value of the name attribute.
Source : http://help.dottoro.com/lhwgvcmt.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文