item Method
Retrieves a namespace object from the namespaces collection.
Syntax
oItem = object.item(vIndex)
Parameters
vIndex Required. Integer or String that specifies the namespace to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, the namespace matching the string is retrieved.
Return Value
Returns a namespace if successful, otherwise null.
Examples
This example uses the item method to retrieve a namespace from the namespace collection, import an element behavior, and dynamically add the element behavior to the document.
<html xmlns:xx> <head> <script> function Init() { oNSColl = document.namespaces; oNS = oNSColl.item("xx"); oNS.doImport("editBox.htc"); oElem = document.createElement("xx:editBox"); document.body.appendChild(oElem); } </script> </head> <body onload="Init()"></body> </html>
Standards Information
There is no public standard that applies to this method.
Applies To
namespaces, HTMLNamespaceInfoCollection Constructor