在Chrome插件,通过后台脚本,我注入一种风格是这样的:的Javascript:如何检查样式是否已注入
if(!styleLeft){
var styleLeft = document.createElement("style");
document.head.appendChild(styleLeft);
styleLeft.innerHTML = "a, .left-hand { cursor: wait; }";
}
但是当样式标签,如果不工作已经在页面中。我怎样才能找到我的特定风格?
谢谢。
哪一个是“你的具体风格”? – Bergi
为什么你在if条件中使用'styleLeft',你事后分配给它?请向我们展示完整的代码。 – Bergi
因为是一个铬插件 – lorussian