changeElementClass( id, customClass )



This function changes the CSS class of an element, allowing it to assume new cascading style sheet attributes such as borders and colors.

Parameters:

  • id – element identifier

  • customClass – CSS class name

Example:

changeElementClass('OutputField1', 'BigText');

The function call listed above is equivalent to the native JavaScript syntax:

document.getElementById("OutputField1").className = 'BigText';