IE では、私のコードはウィンドウの右側と上部に 3 つの画像 (最小化、復元、閉じる) を表示します。しかし、Firefox と Chrome では失敗します。
どのように修正するのですか?
ありがとう。
function Panel(_caption,_width,_height,_confirmFunction) {
this.icon=new Array();
this.icon["minimize"]=Env.envPath+'/UI/images/minimize.gif';
...
this.init=function() {
this.mainDiv=document.createElement("div");
this.mainDiv.style.cssText="padding:2px 2px 2px 2px;position:absolute;width:"+_width+"px;left:50%;margin-left:-"+(_width/2)+"px;top:50%;margin-top:-"+(_height/2+50)+"px;border-right:1px solid gray;border-top: 1px solid white;border-left:1px solid white;border-bottom:1px solid gray;background-color:#F2F1ED";
document.body.appendChild(this.mainDiv);
this.mainDiv.handler=this;
this.toolDiv=document.createElement("div");
this.toolDiv.style.cssText="background-color:#47649A;height:20px;float:right;margin-left:-3px";
this.mainDiv.appendChild(this.toolDiv);
var _img=document.createElement("img");
_img.src=this.icon["minimize"];
_img.style.cssText="margin-top:2px;cursor:pointer";
_img.title="Minimize";
_img.handler=this;
_img.onclick=function(event) {
this.handler.minimize();
}
this.toolDiv.appendChild(_img);
...
}
...
}