|
[b]原文[/b]:
namedItem method
This method retrieves a Node using a name. With [HTML 4.01] documents, it first searches for a Node with a matching id attribute. If it doesn't find one, it then searches for a Node with a matching name attribute, but only on those elements that are allowed a name attribute. With [XHTML 1.0] documents, this method only searches for Nodes with a matching id attribute. This method is case insensitive in HTML documents and case sensitive in XHTML documents.
[b]翻译:[/b]
namedItem 方法:
此方法获通过 "name"属性来获取节点.
[b]在HTML4.01文档中,它首先搜索的是节点的ID属性的值. 如果没找到匹配节点,才去搜索name 属性与之匹配的节点. 即HTML4.01 DTD下,浏览器们应该优先通过ID来获取节点.其次才是name.[/b]
[b]在XHTML 1.0文档中,则仅搜索ID与之匹配的节点.[/b]
对于节点(id or name)属性的值,此方法在HTML文档中忽略大小写区别,而在XHTML文档中.则要区别大小写. |
|
[b] 微软MSDN上查到的 NodeList实现 ,虽然这些资料告诉我们 NodeList继承了 [/b][b]Microsoft.SpeechServer.Dom.Collections.Collection Class . 但是事实却并不如此. 事实上,ie浏览器的NodeList不具备 ICollection接口定义的 namedItem 和 tags 两个方法. 实现了他们的 只有HTMLCollection类型.[/b]
[b]此文档是 Speech Server 2007 用的,所以应该仅供参考.只能说明IE浏览器中的NodeList 还是遵守标准的.
[/b]
[b]public sealed class NodeList : Collection, INodeList, IEnumerable, IExpando, IReflect[/b]
[b]NodeList的继承链:[/b]
[b]System.Object
[/b]
Microsoft.SpeechServer.Dom.Shim [b] Microsoft.SpeechServer.Dom.DynamicShim [/b] [b] Microsoft.SpeechServer.Dom.Collections.Collection [/b] [b] [/b] [b]Microsoft.SpeechServer.Dom.Collections.NodeList[/b] [b]
[/b] [b]
[/b]
[b]Collection 实现的ICollection接口定义的属性和方法表[/b]
[b]
[/b]
[b]public properties : item(msdn上说item是重载,我表示诧异...),length[/b]
[b]public methods : item,namedItem,tags[/b] |
| Property | Description |
|---|---|
| [url=http://msdn.microsoft.com/en-us/library/ms534103(v=VS.85).aspx]length[/url] | Gets the number of characters in a [url=http://msdn.microsoft.com/en-us/library/ms535905(v=VS.85).aspx]TextNode[/url] object. |
| Method | Description |
|---|---|
| [url=http://msdn.microsoft.com/en-us/library/ms536609(v=VS.85).aspx]item[/url] | Retrieves an object from a [url=http://msdn.microsoft.com/en-us/library/ms537445(v=VS.85).aspx]childNodes[/url] or [b]StaticNodeList[/b] collection. |
|
[b]限定方[/b] |
[b]方法\浏览器[/b] | [b]IE8[/b] | [b]IE9 beta7930.16406[/b] | [b]FireFox4.0 beta7[/b] | [b]Chrome10.0 Dev[/b] | [b]Safari5.02[/b] | [b]Opear11[/b] |
| W3C DOM2 | [b]getElementsByTagName[/b] |
HTMLCollection
|
HTMLCollection |
HTMLCollection |
NodeList |
NodeList |
NodeList |
|
WHATWG HTML5 |
[b]getElementsByClassName[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
NodeList |
NodeList |
NodeList |
|
W3C DOM1 |
[b]getElementsByName[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
NodeList |
NodeList |
NodeList |
|
W3c Selectors API 1 |
[b]querySelectorAll[/b] | [b]StaticNodeList[/b] |
[b]StaticNodeList[/b] |
NodeList(Static)[b](注0)[/b] |
NodeList(Static) |
NodeList(Static) |
NodeList(Static) |
|
W3C DOM1 |
[b]childNodes[/b] | NodeList |
NodeList |
NodeList |
NodeList |
NodeList |
NodeList |
|
MS |
[b]children[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
| w3c DOM1 |
[b]document.links[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
|
w3c DOM1 |
[b]document.images[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
|
w3c DOM1 |
[b]document.anchors[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
|
w3c DOM1 |
[b]document.forms[/b] |
HTMLCollection
|
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
| w3c DOM1 | [b]document.applets[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
| w3c DOM1 | [b]formElement.elements[/b] |
HTMLFormElement
|
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
| w3c DOM1 | [b]selectElement.options[/b] |
HTMLSelectElement |
HTMLSelectElement |
HTMLOptionsCollection |
HTMLOptionsCollection |
HTMLOptionsCollection |
HTMLOptionsCollection |
| w3c DOM1 | [b]tableElement.rows[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
| w3c DOM1 | [b]rowElement.cells[/b] |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
HTMLCollection |
| MS | [b]document.all[/b] |
HTMLCollection |
HTMLCollection |
(S)-[b](注4)[/b]
(Q)object HTML document.all class |
HTMLAllCollection[b](注1)[/b] |
HTMLAllCollection[b](注2)[/b] |
HTMLCollection[b](注3)[/b] |
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有