Style cssText : Style « HTML « JavaScript DHTML






Style cssText

 <html> <body> <script language="JavaScript"> function function1() { document.all.myP.style.cssText = "color:green; font-family:verdana; font-weight:bold; font-size:16"; } </script> <p id="myP">Text Text Text Text Text Text Text Text </p> <input type="button" value="Click to apply the style rules" onClick="function1();"> </body> </html> 








Related examples in the same category

1.Style type Example
2.Show and hide the div tags
3.In-Place Help
close