THtmlNode() > Html Attribute data |
Attributes of an HTML node.
Data type: | H | Default: | NIL |
:attr is a generic Access/Assign variable returning all attributes of the THtmlNode as a Hash, or collecting one or more attributes upon assignment. The following code shows valid usage examples:
? oNode:htmlTagName // result: table // assigning a single attribute oNode:attr := 'border="0"' ? oNode:attrToString() // result: border="0" // assigning multiple attributes as character string oNode:attr := 'border=1 cellspacing=1' ? oNode:attrToString() // result: border="1" cellspacing="1" // assigning multiple attributes as Hash oNode:attr := { "border" => "0", "cellpadding" => "0" } ? oNode:attrToString() // result: border="0" cellpadding="0"
http://www.xHarbour.com