|
attr()
Returns the value of the specified attribute of the first element in a result set, or sets the value of the specified attribute of each element in a result set. attr(attributeName) : StringReturns the value of the specified attribute of the first element in a result set. attributeName String; the name of the attribute. ExamplesThis script - with the selector
The following script looks up an image with the ID #image1 and stores its background color in a variable.
attr(attributeName, value)Sets the value of the specified attribute of each element in a result set. attributeName String; the name of the attribute. value String; value for the attribute. ExamplesThis script looks up an image in an element with the ID #calloutbox and sets its alternative text to a value from a data field
The following script sets the background color of a specific table cell in an email to red if the value of the field TOTAL has a negative value in the current record.
|
|