XML DOM createAttribute() 方法

Document 对象参考手册

定义和用法

创建新的 Attr 节点。

语法:

createAttribute(name)
参数 描述
name 新创建的属性的名称。

抛出

如果 name 参数中含有不合法的字符,该方法将抛出代码为 INVALID_CHARACTER_ERR 的 DOMException 异常

参阅

Element.setAttribute()Element.setAttributeNode()

Document 对象参考手册

系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南