JavaScript Reference/Javascript Properties/cssText
"cssText" Example
<source lang="javascript">
<html> <body> <script language="JavaScript"> function function1() {
document.all.myP1.style.cssText = "color:green;";
} </script>
Text Text Text Text Text Text Text Text
<input type="button" value="Click to apply the style rules" onClick="function1();"> </body> </html>
</source>
"cssText" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |runtimeStyle style | | |styleSheet | +----------------+--------------------------------------------------------------+
</source>
"cssText" Syntax and Note
<source lang="javascript">
Note: Read and write property. Sets an array of style sheet rules.
Syntax:
objectName.cssText = value
</source>