Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > Control object > Methods

JavaScript API: Control object > add CSS Class

Scroll Prev Next More

 

Adds the CSS class to the control with a value.

Syntax

ctrl.addCSS(CSSclass);

Arguments

CSSclass

the CSS class name. Example: 'highlight'.

Return value

No return value.

Example

Add a CSS class highlight to the control using the JavaScript OnLoad event:

 

var ctrl = Runner.getControl(pageid, 'Make');
ctrl.addCSS('highlight');

See also:

JavaScript API: Control object > getControl()

JavaScript API: Control object > remove CSS Class

JavaScript API: Control object >addStyle()

Customizing CSS examples

Events: JavaScript OnLoad

JavaScript API: Control object

JavaScript API