Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/02/2011, 22:17
Ootl
 
Fecha de Ingreso: enero-2011
Mensajes: 13
Antigüedad: 14 años
Puntos: 0
Respuesta: Eliminar determinado CSS

Cita:
Iniciado por goteen_mx Ver Mensaje
Si tu sabes que estilos vas a quitar, que tal así

Código Javascript:
Ver original
  1. <html>
  2. <head>
  3.     <link rel="stylesheet" type="text/css" href="http://static.forosdelweb.com/clientscript/fdwforumhome/headmenu.css?v=1" />
  4.     <link rel="stylesheet" type="text/css" href="http://static.forosdelweb.com/clientscript/fdwforumhome/shared.css?v=2" />
  5.     <link rel="stylesheet" type="text/css" href="http://static.forosdelweb.com/clientscript/fdwforumhome/otroCss.css?v=2" />
  6.     <script>
  7.         var aQuitarCss = new Array();
  8.         aQuitarCss[0]="http://static.forosdelweb.com/clientscript/fdwforumhome/headmenu.css?v=1";
  9.         aQuitarCss[1]="http://static.forosdelweb.com/clientscript/fdwforumhome/otroCss.css?v=2";
  10.        
  11.         function getStyles(){
  12.             for(var i=0;i<document.styleSheets.length;++i){
  13.                 for(var j=0;j<aQuitarCss.length;j++)
  14.                     if(document.styleSheets[i].href==aQuitarCss[j]){
  15.                         document.styleSheets[i].disabled=true;
  16.                 }
  17.             }
  18.             for(i=0;i<document.styleSheets.length;++i){
  19.                 alert(document.styleSheets[i].disabled);
  20.             }
  21.         }
  22.     </script>
  23. </head>
  24. <body>
  25.     <input type="button" value="getStyles" onclick="getStyles();" />
  26.   </body>
  27. </html>


Saludos.
Gracias por contestar, peor lo que yo buscaba era un script, que se haga automáticamente...