87,901
社区成员
发帖
与我相关
我的任务
分享
var Dialog = function()
{
var me = this;
this.MaskImage = null;
this.Content = null;
this.Text = null;
this.Container = null;
this.ImagePath = "img/dialog/";
this.posX = 0;
this.posY = 0;
this.IsDown = false;
this.Width = 300;
this.Height = 0;
this.DocVisibleWidth = 0;
this.DocVisibleHeight = 0;
this.DocMaxWidth = 0;
this.DocMaxHeight = 0;
this.ImgZIndex = 101;
this.DialogZIndex = 102;
this.ButtonOK = null;
this.ButtonCancel = null;
this.ButtonRetry = null;
this.Icon =
{
Close_Normal: this.ImagePath + "close_normal.png",
Close_Higthlight: this.ImagePath + "close_highlight.png",
Mask_Image: this.ImagePath + "mask.png",
Dialog_Icon: this.ImagePath + "icon.png"
};
this.Remove = function()
{
document.body.removeChild(this.Container);
document.body.removeChild(this.MaskImage);
}
this.OK = function()
{
me.Close();
}
this.Retry = function()
{
}
this.Close = function()
{
this.Hide();
}
this.Hide = function()
{
this.Container.style.display = "none";
this.MaskImage.style.display = "none";
}
this.MaskImage = document.createElement("img"); //这里我能理解。创建一个img的dom
this.MaskImage.style.position = "absolute";
this.MaskImage.style.left = 0;
this.MaskImage.style.top = 0;
this.MaskImage.src = this.Icon.Mask_Image; //北京遮蔽图
document.body.appendChild(this.MaskImage);
background-color:#FFF;
filter:alpha(opacity=50);
opacity:0.5;
var bgObj = document.createElement("div");
bgObj.setAttribute('id', 'bgDiv');
bgObj.style.position = "absolute";
bgObj.style.top = "0";
bgObj.style.background = "#FFF";
bgObj.style.filter = "alpha(opacity=50)";
bgObj.style.opacity = "0.5";
bgObj.style.left = "0";
bgObj.style.width = "200px";
bgObj.style.height = "200px";
bgObj.style.zIndex = "100";
document.body.appendChild(bgObj);
this.Hide = function () {
this.Container.style.display = "none";
//this.MaskImage.style.display = "none";
bgObj.style.display = "none"
}