?
//1、将已存在的样式表css禁用掉
??for ( i = 0; i < document.styleSheets.length; i++ )
???????{
????????document.styleSheets[i].disabled = true;
???????}
?
//2、添加新的样式表
?????? var selectedTheme = ...;//目标样式的路径
?
?????? var head = document.getElementsByTagName('HEAD').item(0);
???????
???????var ga = document.createElement('link');
???????ga.rel = "stylesheet";
???????ga.type = 'text/css';?
???????ga.href = selectedTheme ;
???????head.appendChild(ga);