Style rule 'selectorText' Example : Rule : Style Layout JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Style Layout » Rule »

 

Style rule 'selectorText' Example



    
<html>
<body>
<style>
#myP font-family:verdana, arial; font-weight:bold; font-size:16px; }
</style>
<script language="JavaScript">
    function function1() {
        alert(document.styleSheets[0].rules[0].selectorText);
    }
</script>
<p id="myP" onclick="function1()">Sample text.</p>
<input type="button" value="Selector Text" onclick="function1()">
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Style Layout
» Rule