I would like to return a string with all of the contents of a CSS rule, like the format you\'d see in an inline style. I\'d like to be able to do this without knowing what i
function getStyle(className) { document.styleSheets.item("menu").cssRules.item(className).cssText; } getStyle('.test')
Note : "menu" is an element ID which you have applied CSS. "className" a css class name which we need to get its text.