87,907
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
function newtag(){
var o = document.createElement("div");
document.getElementById("fuck").appendChild(o);
o.style.position = "absolute";
o.style.width = 200;
o.style.height = 200;
o.style.left = 100;
o.style.top = 100;
o.style.zIndex = 10000;
o.style.backgroundColor = "red";
o.onclick = function(){alert("fuck")};
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page </title>
<script type="text/javascript">
function newtag(){
var o = document.createElement("div");
document.getElementById("fuck").appendChild(o);
o.parentNode.style.position = "relative";
o.style.position = "absolute";
o.style.width = 200 + 'px';
o.style.height = 200 + 'px';
o.style.left = 100 + 'px';
o.style.top = 100 + 'px';
o.style.zIndex = 10000;
o.style.backgroundColor = "red";
o.onclick = function(){
alert("fuck");
}
}
</script>
</head>
<body>
<div id="fuck" style=" width:400px; height:400px; background-color: Black" >
</div>
<script type="text/javascript">
newtag();
</script>
</body>
</html>
<script type="text/javascript">
function newtag(){
var o = document.createElement("div");
document.getElementById("fuck").appendChild(o);
o.style.position = "absolute";
o.style.width = 200;
o.style.height = 200;
o.style.left = 100;
o.style.top = 100;
o.style.zIndex = 10000;
o.style.backgroundColor = "red";
o.onclick = new Function("alert(\"fuck\")");
}
</script>