vwin.style.setAttribute("width",wWidth+"px");
vwin.style.setAttribute("height",wHeight+"px");
vwin.style.setAttribute("left",wLeft+"px");
vwin.style.setAttribute("top",wTop+"px");
vwin.style.setAttribute("backgroundColor","#8bcee4");

在firefox下不起作用,应该是style下面不支持setAttribute了,只能用其他方式了。

有下面几种方式:
vwin.style.cssText="position:absolute;width:"+wWidth+"px"+";height:"+wHeight+"px"+";left:"+wLeft+"px;"+"top:"+wTop+"px"+";background:#8bcee4;";
vwin.style.width="100px";

还引用一个,这个没测试
var oStyle = oNode.getAttribute("style");

// ie

if(oStyle == "[object]") {

oStyle.setAttribute("cssText", strStyle);

oNode.setAttribute("style", oStyle);

} else {

oNode.setAttribute("style", strStyle);

}