JavaScript Reference/Javascript Properties/cssText — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
"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>