XML DOM isId 属性

定义和用法
isId 属性在属性是 ID 类型时返回 true(例如,包含了其所属的元素的标识符),否则返回 false。
语法
attrObject.isId
下面的代码片段使用 books.xml" 载入 xmlDoc 中,并返回 category 属性是否是 <book> 元素的 ID 属性:
实例代码
xmlDoc=loadXMLDoc("books.xml");
x=xmlDoc.getElementsByTagName('book');
for(i=0;i<x.length;i++)
{
document.write(x.item(i).attributes[0].isId);
document.write("<br>");
}
上面的代码将输出:
false
