function GridView_OpenDialog2(url, widthpx, heightpx, imgurl) {
var dialogcenter = ";dialogTop:" + ((window.screen.height / 2) - (heightpx.replace("px", "") / 2)) + " ; dialogLeft:" + ((window.screen.width / 2) - (widthpx.replace("px", "") / 2)) + ";";
if (imgurl) {
var mask = document.createElement("DIV");
mask.id = "GridView_mask";
var style = "";
style += "background-color:white;";
style += "width:100%; height:100%;";
style += "position:fixed; top:0; left:0; zindex:1000;";
style += "filter:alpha(opacity=70); opacity:0.7; zoom:1;-moz-opacity:0.7;";
mask.style.cssText = style;
//=======下面這些只有IE支援不建議這樣使用
//mask.style.position = "fixed";
//mask.style.top = 0;
//mask.style.left = 0;
//mask.style.width = "100%";
//mask.style.height = "100%";
//mask.style.zIndex = 1000;
//mask.style.backgroundColor = "white";
//mask.style.filter = "Alpha(Opacity=70);";
mask.innerHTML = "";
document.body.appendChild(mask);
}
var retvar = showModalDialog(url, self, "dialogWidth:" + widthpx + ";dialogHeight:" + heightpx + ";resizable:yes;scroll:yes;status:no;" + dialogcenter) != null;
if (imgurl) {
document.body.removeChild(mask);
}
}
留言
張貼留言
您好,我是 Lawrence,這裡是我的開發筆記的網誌,如果你對我的文章有任何疑問或者有錯誤的話,歡迎留言讓我知道。