|
PHP5中文手册
DOMElement->setAttribute()(No version information available, might be only in CVS) DOMElement->setAttribute() — Adds new attribute 说明DOMElement
bool setAttribute
( string $name
, string $value
)
Sets an attribute with name name to the given value. If the attribute does not exist, it will be created. 参数
返回值如果成功则返回 TRUE,失败则返回 FALSE。 错误/异常
范例
Example#1 Setting an attribute
<?php |