An alternate code I use that works is:
if(v_ns6up || v_ie6up)
{
var container = document.createElement("div");
container.innerHTML = myContent;
container.setAttribute("class", myClassName);
container.setAttribute("id", myName);
document.body.appendChild(container);
}
I rearranged the last 4 lines in multiple ways and it still seemed to
work. Not sure about your code though.
-Mo
JS wrote:
> Dennis wrote:
>
>
>>Here are my example the 3rd one not working
>>
>>var aa=document.createElement('div');
>>aa.style.position="absolute";
>>aa.style.left='100px';
>>aa.style.top='100px';
>>aa.innerHTML=1
>>document.body.appendChild(aa);
>>
>>var bb=document.createElement('div');
>>document.body.appendChild(bb);
>>bb.style.position="absolute";
>>bb.style.left='200px';
>>bb.style.top='200px';
>>bb.innerHTML=2
>>
>>var cc=document.createElement('div');
>>document.body.appendChild(cc);
>>cc.style.position="absolute";
>>cc.style.width="100px";
>>cc.style.height="100px";
>>cc.style.left='300px';
>>cc.style.top='300px';
>>cc.innerHTML=3
>>
>>
>>
>>
>
> Please direct these issues to : news.mozilla.org
>
> Thank you.
>
>