怎么用js添加一个div?
很简单,直接上代码:


<body>
test
</body>
<script>
var webshield_info = document.createElement('div');
webshield_info.innerHTML = 'THIS WEBSITE IS PROTECTED BY <A HREF="HTTP://WWW.WOQIDEGE.COM" TARGET="BLANK">WEBSHIELD';
webshield_info.style.background = "#333333";
webshield_info.style.color = "#ffffff";
webshield_info.children[0].style.color="#ffffff";
webshield_info.children[0].style.underline ="none";
webshield_info.style.textAlign = "center";
document.body.appendChild(webshield_info);
</script>