Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/02/2011, 21:50
Avatar de goteen_mx
goteen_mx
 
Fecha de Ingreso: abril-2005
Ubicación: D.F.
Mensajes: 403
Antigüedad: 19 años, 11 meses
Puntos: 37
Respuesta: Eliminar determinado CSS

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.