无法在Firefox扩展程序</div>中将<div>添加到Youtube

时间:2013-11-06 10:06:34

标签: javascript firefox firefox-addon

我无法向Youtube添加<div>但不知道原因。

我的Javascript代码:

var div = document.createElement("div");

div.id="divsn";
div.style.display='none';
div.style.width = "500px";
div.style.height = "400px";
div.style.background = "#C2E2FF";
div.style.display='block';

document.body.insertBefore(div, document.body.firstChild);
document.getElementById("divsn").style.fontStyle = 'italic';
document.getElementById("divsn").style.marginTop = "560px";
document.getElementById("divsn").style.marginLeft = "460px";
document.getElementById("divsn").style.position = "absolute";

0 个答案:

没有答案