javascript查看页面引用什么CSS文件
var cssStyle = document.styleSheets;
for (var i = 0; i < cssStyle.length; i++) {
if (cssStyle[i].href != null) {
var csshref = cssStyle[i].href;
if (csshref.indexOf("blue") > 0) {
tmpcssColor = "#F5FAFF";
break;
}
else if (csshref.indexOf("default") > 0) {
tmpcssColor = "#FFF8E8";
break;
}
else if (csshref.indexOf("green") > 0) {
tmpcssColor = "#F4FAF0";
break;
}
}
}
补充:web前端 , JavaScript ,