The effect of the brothers ' questioning in the group
<ptml> <pead> <title> Untitled document </title> <style>p.p1{Background-color: #FF0000; font-size : 22px;_ font-family: "Founder Shu Body"; font-weight:100; }</style> <script language= "JavaScript" > Function remove () {var WC = document.stylesheets[0], I; for (i = 0; i < wc.rules.length i + +) wc.removerule (i); } </script></pead> <body><p Class=p2 founder Shu Body "; font-weight:100; " > Hello,this is a example of stylesheets</p> <form> <input type= "button" value= "Press me to cancel the downlink background setting" onclick= "R Emove () "> <p class=p1> hello,this is a example of stylesheets</p> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Good control CSS on the Internet
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "> <title>js control style </title> <style type=" TEXT/CSS ">/* this don't go. * * {font-size:12px; } </style> <script type= "Text/javascript" > (function () {if window. Cssstylesheet) {var WC = window. Cssstylesheet.prototype; Wc.addrule = function (A, b) {var WC = this; Wc.insertrule (A + "{" + B + "}", Wc.cssRules.length); }; Wc.removerule = function (a) {var WC = this; Wc.deleterule (a); }; WC.__DEFINEGETTER__ ("Rules", New Function ("Return this.cssrules"); } })(); var addrule = function (A, b) {var WC = document.stylesheets[0], I; for (i = 0; i < wc.rules.length; i + +) if (Wc.rules[i].selectortext = = a) wc.removerule (i); Wc.addrule (A, b); }; var add = function () {var WC = document.getElementById ("WC"). Value; if (/([^\{]+) \s* (\{[^}]+\})/.test (WC)) {addrule (regexp.$1, regexp.$2); else {alert ("style error"); } }; </script> <span class= "Font" > I am the word </span><pr/> <button onclick= "Add ()" > Control </button > <textarea id= "WC" > Font {font-size:18px; Font-weight:bold; line-height:20px; Color: #FF0000; } </textarea> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]