Forum und email

DOMDocument->createAttribute()

(No version information available, might be only in CVS)

DOMDocument->createAttribute() — Create new attribute

说明

DOMDocument
DOMAttr createAttribute ( string $name )

This function creates a new instance of class DOMAttr. 本节点ä¸ä¼šå‡ºçŽ°åœ¨æ–‡æ¡£ä¸­ï¼Œé™¤éžæ˜¯ç”¨ä¾‹å¦‚ DOMNode->appendChild() 函数æ¥å°†å…¶æ’入。

傿•°

name

The name of the attribute.

返回值

The new DOMAttr or FALSE if an error occured.

错误ï¼å¼‚常

DOM_INVALID_CHARACTER_ERR

Raised if name contains an invalid character.