I’m attemtping to create a colored division on a web page by means of the enclosed function. Can someone tell me why it doesn’t work? (IE6).
function addDiv()
{
var division=document.createElement(‘div’);
division.setAttribute(‘id’,’divdiv’);
division.setAttribute(‘class’,’ccc’);
document.body.appendChild(division);
var ff=document.getElementById(‘divdiv’);
ff.style.position=absolute;
ff.style.top=100px;
ff.style.left=100px;
ff.style.width=100px;
ff.style.height=100px;
}
Thanks in advance.