JavaScript Reference/Javascript Properties/cssText
Версия от 18:30, 25 мая 2010; (обсуждение)
"cssText" Example
<html>
<body>
<script language="JavaScript">
function function1() {
document.all.myP1.style.cssText = "color:green;";
}
</script>
<p id="myP1">Text Text Text Text Text Text Text Text </p>
<input type="button" value="Click to apply the style rules" onClick="function1();">
</body>
</html>
"cssText" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |runtimeStyle style |
| |styleSheet |
+----------------+--------------------------------------------------------------+
"cssText" Syntax and Note
Note:
Read and write property.
Sets an array of style sheet rules.
Syntax:
objectName.cssText = value