show / hide menu

SetHTMLAttrribute

This function is used to set the HTML attribute for controls. 

Syntax: 

SetHTMLAttribute(IdentifierType, AttributeName, AttributeValue, IdentifierValue) 

The IdentifierType specifies the type of identifier such as ControlName, Class or ID. The user will have to specify the attribute name and attribute value. The IdentifierValue is the actual value of an identifier such as ControlName, Class, or ID. Multiple values can be specified, separated by commas. 

Examples: 

SetHTMLAttribute(ID,”aria-label”,”TextBox_ID”,GetControlId(TextBox1)) 

This function sets the aria-label attribute to “TextBox_ID” on the control identified by TextBox1. 

SetHTMLAttribute(ControlName,”aria-label”,Textbox,TextBox1) 

This function assigns the aria-label attribute with the value “Textbox” to the control named TextBox1. 

SetHTMLAttribute(Class,”aria-label”,”TextBox_Class”,txt) 

This function applies the aria-label attribute with the value “TextBox_Class” to all controls with the class name “txt”.