Code:
var myObject = document.createElement("div"); myObject.setAttribute("class", "myclass"); myObject.appendChild(document.createTextNode("The content to go in the myObject DIV"));
Code:
.myclass { margin-left:20px; margin-right:20px; width:200px; height:200px; background:url(objectbg.png)
Leave a comment: