THtmlNode() > Html Attribute methods xHarbour Developers Network  

oTHtmlNode:setAttribute()

Sets an attribute and its value.

Syntax

:setAttribute( <cAttrName>, <cAttrValue> ) --> cValue

Arguments

<cAttrName>
This is a character string holding the name of the attribute to set. It is case insensitive.
<cAttrValue>
This is a character string holding the value of the attribute to set.

Description

Method :setAttribute() assigns the value <cAttrValue> to the attribute named <cAttrName>. If the attribute is not present, it is created. If the attribute is not valid for the HTML tag, a runtime error is raised. Use function THtmlIsValid() to verify if the attribute is valid.

Note:  attributes that have only a name but no value receive always an empty string ("") as their value. This applies to the following HTML attributes:

Attributes with no value
Attribute 
checkednoresize
compactnoshade
declarenowrap
deferreadonly
disabledselected
ismapshowgrid
multipleshowgridx
nohrefshowgridy


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe