CSSRule.cssText

  • Revision slug: DOM/CSSRule/cssText
  • Revision title: cssText
  • Revision id: 30611
  • Created:
  • Creator: Dria
  • Is current revision? No
  • Comment

Revision Content

{{ DomRef() }}

Summary

cssText returns the actual text of the style rule.

Syntax

string = cssRule.cssText 

Example

if ( myRule.cssText.indexOf("background-color") != -1 ) {
   bgRule = myRule;
} 
... 

Specification

DOM Level 2 Style - cssRule

Revision Source

<p>
{{ DomRef() }}
</p>
<h3 name="Summary">Summary</h3>
<p><b>cssText</b> returns the actual text of the style rule. </p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval"><i>string</i> = cssRule.cssText 
</pre>
<h3 name="Example">Example </h3>
<pre class="eval">if ( myRule.cssText.indexOf("background-color") != -1 ) {
   bgRule = myRule;
} 
... 
</pre>
<h3 name="Specification">Specification </h3>
<p>DOM Level 2 Style - cssRule
</p>
Revert to this revision