Udostępnij za pośrednictwem


Sys.UI.Control addCssClass Method

Adds a CSS class to the HTML Document Object Model (DOM) element that the control is attached to.

var a = new Sys.UI.MyControl(domElementObj);
a.addCssClass(className);

Parameters

  • className
    A string that contains the name of the CSS class to add.

Return Value

None.

Remarks

Use the addCssClass method to add a CSS class to a control. If the CSS class has already been added to the control, addCssClass makes no changes to the control.

See Also

Reference

Sys.UI.Control Class

Other Resources

Language Reference