博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[JavaScript]自定义MessageBox
阅读量:6671 次
发布时间:2019-06-25

本文共 23252 字,大约阅读时间需要 77 分钟。

前言:

    继上文()之后,我的工作是进一步增强一些IE所不能提供的东东.
    还记得Windows下的MessageBox嘛?
    IE呢?Alert?Confirm? 是不是好丑呢?
    不过丑就算了,关键是还不好用.
    本次的目标是,提供好看又好用的Web版的Windows MessageBox.(已测试,兼容IE和FF)
正文:
    首先自然是先画好Html下的对话框样子了(用层来模拟):
    画得不专业,先用着,反正后面可以通过css来调整.
    接下来的工作就是需要通过Javascript动态输入这个层的内容.首先参考中的方式,代码虽然很多,不过只不过比多了几个层而已,大同小异:
   

  1
None.gif
  2
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox = 
dot.gif {
  3
InBlock.gif  name: "KMessageBox",
  4
InBlock.gif  capiton : "消息框",
  5
InBlock.gif  content: "提示消息",
  6
InBlock.gif  msgbox : 
null,
  7
InBlock.gif  msgcaptioninfo:
null,
  8
InBlock.gif  msgcontent:
null,
  9
InBlock.gif  msgContenttxtmsg:
null,
 10
InBlock.gif  msgbuttonyes:
null,
 11
InBlock.gif  msbbuttonno:
null,
 12
InBlock.gif  msgico:
null 
 13
ExpandedBlockEnd.gif};
 14
None.gif
 15
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox.init = 
function () 
dot.gif {
 16
InBlock.gif    
var msgNameSpaceURI = "http://www.w3.org/1999/xhtml";
 17
InBlock.gif    
 18
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContainerID)
dot.gif
var msgContainerID= "KMessageBox"; }
 19
InBlock.gif
 20
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgCaptionID)
dot.gif
var msgCaptionID= "KMessageBox_caption"; }
 21
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgCaptionInfoID)
dot.gif{
var msgCaptionInfoID = "KMessageBox_caption_info";}
 22
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentID)
dot.gif
var msgContentID = "KMessageBox_content"; }
 23
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentTxtID)
dot.gif
var msgContentTxtID= "KMessageBox_content_txt"; }
 24
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentTxtICOID)
dot.gif{
var msgContentTxtICOID="KMessageBox_content_txt_ico"};
 25
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentTxtMsgID)
dot.gif{
var msgContentTxtMsgID="KMessageBox_content_txt_msg"};
 26
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtons)
dot.gif{
var msgButtonsID="KMessageBox_buttons"};
 27
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtonYes)
dot.gif{
var msgButtonYesID="KMessageBox_buttons_yes"};
 28
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtonNo)
dot.gif{
var msgButtonNoID="KMessageBox_buttons_no"};    
 29
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtonOK)
dot.gif{
var msgButtonOKID="KMessageBox_buttons_ok"};    
 30
InBlock.gif
 31
InBlock.gif    
var msgContainer = $(msgContainerID);
 32
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContainer) 
dot.gif{
 33
InBlock.gif      msgContainer = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div");
 34
InBlock.gif      msgContainer.setAttribute("id", msgContainerID);
 35
InBlock.gif      msgContainer.setAttribute("style","MARGIN: 0px auto; POSITION: absolute; TEXT-ALIGN: center;");
 36
InBlock.gif
 37
InBlock.gif
 38
InBlock.gif    
var msgCaption = $(msgCaptionID);
 39
InBlock.gif
 40
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgCaption)
dot.gif{
 41
InBlock.gif      msgCaption = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 42
InBlock.gif      msgCaption.setAttribute("id",msgCaptionID);
 43
InBlock.gif      Element.addClassName(msgCaption,"caption");      
 44
InBlock.gif
 45
InBlock.gif      
 46
InBlock.gif      
var msgCaptionInfo = $(msgCaptionInfoID);
 47
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
if(!msgCaptionInfo)
dot.gif{
 48
InBlock.gif      msgCaptionInfo = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 49
InBlock.gif      msgCaptionInfo.setAttribute("id",msgCaptionInfoID);
 50
InBlock.gif      Element.addClassName(msgCaptionInfo,"info");
 51
InBlock.gif      msgCaption.appendChild(msgCaptionInfo);
 52
ExpandedSubBlockEnd.gif      }
 53
InBlock.gif      msgContainer.appendChild(msgCaption);
 54
InBlock.gif      
 55
ExpandedSubBlockEnd.gif    }
 56
InBlock.gif    
 57
InBlock.gif    
var msgContent = $(msgContentID);
 58
InBlock.gif
 59
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContent)
dot.gif{
 60
InBlock.gif      msgContent= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 61
InBlock.gif      msgContent.setAttribute("id",msgContentID);
 62
InBlock.gif      Element.addClassName(msgContent,"content");
 63
InBlock.gif      
 64
InBlock.gif      
var msgContentTxt = $(msgContentTxtID);
 65
InBlock.gif      
 66
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
if(!msgContentTxt )
dot.gif{
 67
InBlock.gif      msgContentTxt = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 68
InBlock.gif      msgContentTxt.setAttribute("id",msgContentTxtID);
 69
InBlock.gif      Element.addClassName(msgContentTxt,"txt");
 70
InBlock.gif           
 71
InBlock.gif      
var msgContentTxtICO = $(msgContentTxtICOID);
 72
InBlock.gif      
if(!msgContentTxtICO)
 73
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif{
 74
InBlock.gif         msgContentTxtICO= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "img") : document.createElement("img") ;
 75
InBlock.gif         msgContentTxtICO.setAttribute("id",msgContentTxtICOID);
 76
InBlock.gif         msgContentTxtICO.setAttribute("src","icon_alarm.gif");
 77
InBlock.gif         msgContentTxtICO.setAttribute("align","absMiddle");
 78
InBlock.gif         msgContentTxtICO.setAttribute("style","height:52px;width:64px;background-image:url('icon_big_info.gif');");
 79
InBlock.gif         msgContentTxt.appendChild(msgContentTxtICO);
 80
ExpandedSubBlockEnd.gif      }
 81
InBlock.gif      
 82
InBlock.gif      
var msgContentTxtMsg= $(msgContentTxtMsgID);
 83
InBlock.gif      
if(!msgContentTxtMsg)
 84
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif{
 85
InBlock.gif         msgContentTxtMsg= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "span") : document.createElement("span") ;
 86
InBlock.gif         msgContentTxtMsg.setAttribute("id",msgContentTxtMsgID);
 87
InBlock.gif         
 88
InBlock.gif         msgContentTxt.appendChild(msgContentTxtMsg);
 89
ExpandedSubBlockEnd.gif      }
 90
InBlock.gif
 91
InBlock.gif
 92
InBlock.gif      
var msgButtons = $(msgButtonsID);
 93
InBlock.gif      
if(!msgButtons)
 94
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif{
 95
InBlock.gif         msgButtons = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 96
InBlock.gif         msgButtons.setAttribute("id",msgButtonsID);
 97
InBlock.gif         Element.addClassName(msgButtons,"btnlist");
 98
InBlock.gif         
var msgButtonYes = $(msgButtonYesID);
 99
InBlock.gif          
if(!msgButtonYes)
100
ExpandedSubBlockStart.gif
ContractedSubBlock.gif          
dot.gif{
101
InBlock.gif            msgButtonYes= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "input") : document.createElement("input") ;
102
InBlock.gif            msgButtonYes.setAttribute("id",msgButtonYesID);
103
InBlock.gif            msgButtonYes.setAttribute("type","button");
104
InBlock.gif            msgButtonYes.setAttribute("value","YES");
105
InBlock.gif            Element.addClassName(msgButtonYes,"input_set");
106
InBlock.gif                    
107
InBlock.gif            msgButtons.appendChild(msgButtonYes);             
108
ExpandedSubBlockEnd.gif         }
109
InBlock.gif
110
InBlock.gif         
var msgButtonNo = $(msgButtonNoID);
111
InBlock.gif          
if(!msgButtonNo)
112
ExpandedSubBlockStart.gif
ContractedSubBlock.gif          
dot.gif{
113
InBlock.gif            msgButtonNo= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "input") : document.createElement("input") ;
114
InBlock.gif            msgButtonNo.setAttribute("id",msgButtonNoID);
115
InBlock.gif            msgButtonNo.setAttribute("type","button");
116
InBlock.gif            msgButtonNo.setAttribute("value","NO");
117
InBlock.gif            Element.addClassName(msgButtonNo,"input_set");
118
InBlock.gif            
119
InBlock.gif            msgButtons.appendChild(msgButtonNo); 
120
InBlock.gif            
121
ExpandedSubBlockEnd.gif         }
122
InBlock.gif         
123
InBlock.gif         
var msgButtonOK= $(msgButtonOKID);
124
InBlock.gif          
if(!msgButtonOK)
125
ExpandedSubBlockStart.gif
ContractedSubBlock.gif          
dot.gif{
126
InBlock.gif            msgButtonOK= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "input") : document.createElement("input") ;
127
InBlock.gif            msgButtonOK.setAttribute("id",msgButtonOKID);
128
InBlock.gif            msgButtonOK.setAttribute("type","button");
129
InBlock.gif            msgButtonOK.setAttribute("value","OK");
130
InBlock.gif            Element.addClassName(msgButtonOK,"input_set");
131
InBlock.gif            
132
InBlock.gif            msgButtons.appendChild(msgButtonOK); 
133
InBlock.gif            
134
ExpandedSubBlockEnd.gif         }
135
InBlock.gif
136
InBlock.gif
137
InBlock.gif         msgContentTxt.appendChild(msgButtons);
138
ExpandedSubBlockEnd.gif      }
139
InBlock.gif      
140
InBlock.gif      msgContent.appendChild(msgContentTxt);
141
ExpandedSubBlockEnd.gif      }
142
InBlock.gif
143
InBlock.gif      
144
InBlock.gif      msgContainer.appendChild(msgContent);
145
ExpandedSubBlockEnd.gif    }
146
InBlock.gif
147
InBlock.gif     document.getElementsByTagName("body").item(0).appendChild(msgContainer);
148
ExpandedSubBlockEnd.gif    }
149
InBlock.gif       
150
InBlock.gif    
this.msgbox = $(
this.name);
151
InBlock.gif    
this.msgcaptioninfo = $(msgCaptionInfoID);
152
InBlock.gif    
this.msgContenttxtmsg= $(msgContentTxtMsgID);
153
InBlock.gif    
this.msgbuttonyes = $(msgButtonYesID);
154
InBlock.gif    
this.msgbuttonno = $(msgButtonNoID);
155
InBlock.gif    
this.msgbuttonok = $(msgButtonOKID);
156
InBlock.gif    
this.msgico = $(msgContentTxtICOID);
157
InBlock.gif    Element.hide(
this.msgbox);
158
InBlock.gif   
159
ExpandedBlockEnd.gif}
160
None.gif
161
None.gif
    接下来应该为MessageBox提供行为能力.我们需要模拟Confirm和Alert.
    原始的Confrim需要返回false或者true来决定是否要运行postback事件.
   
在这里我转换了一下思路,不返回值,而是直接将postback事件的脚本(_doPostBack('',''))传入MessageBox,并绑定到相关的按钮上.所以我们的需要接受传入的参数主要有:消息标题,消息内容,按钮事件
    OK,接下来构造Javascript中MessageBox的ShowConfirm函数:
 1
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox.ShowConfirm = 
function (imgdir,caption,msg,YesClick,NoClick) 
dot.gif {
 2
InBlock.gif    
 3
InBlock.gif    
if (!
this.msgbox ) 
return;
 4
InBlock.gif    
 5
InBlock.gif    
this.msgcaptioninfo.innerHTML = caption;
 6
InBlock.gif    
this.msgContenttxtmsg.innerHTML = msg;
 7
InBlock.gif    
//
为了提示消息前面的图片可以适应实际的相对位置,传入程序父目录,主要为封装为Server控件做准备
 8
InBlock.gif       
if(imgdir != "")
 9
ExpandedSubBlockStart.gif
ContractedSubBlock.gif       
dot.gif{
10
InBlock.gif         
this.msgico.setAttribute("src",imgdir+"/kinnsoft_client/KMessageBox/icon_alarm.gif");
11
ExpandedSubBlockEnd.gif       }
12
InBlock.gif       
else
13
ExpandedSubBlockStart.gif
ContractedSubBlock.gif       
dot.gif{
14
InBlock.gif         
this.msgico.setAttribute("src","/kinnsoft_client/KMessageBox/icon_alarm.gif");
15
ExpandedSubBlockEnd.gif       }
16
InBlock.gif    
17
InBlock.gif        
//
使用prototype类库
18
InBlock.gif    Element.show(
this.msgbox);
19
InBlock.gif    Element.show(
this.msgbuttonyes);
20
InBlock.gif    Element.show(
this.msgbuttonno);
21
InBlock.gif    Element.hide(
this.msgbuttonok);
22
InBlock.gif    
23
InBlock.gif    
var x=0,y=0;
24
InBlock.gif    x = (document.documentElement.scrollLeft || document.body.scrollLeft);
25
InBlock.gif    y = (document.documentElement.scrollTop || document.body.scrollTop);
26
InBlock.gif    
27
ExpandedSubBlockStart.gif
ContractedSubBlock.gif        
/**/
/*
一下这段这么复杂的处理方法,是为了符合最新web标准,因为在aspx页面中会默认加入
28
InBlock.gif<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
29
InBlock.gif新的标准中不支持document.body.clientHeight 属性,它是MSIE所有的
30
InBlock.gif
31
ExpandedSubBlockEnd.gif
*/
32
InBlock.gif    
var theWidth=0,theHeight=0;
33
InBlock.gif    
34
InBlock.gif    
if (window.innerWidth) 
35
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
36
InBlock.gif      theWidth = window.innerWidth 
37
InBlock.gif      theHeight = window.innerHeight 
38
ExpandedSubBlockEnd.gif    } 
39
InBlock.gif    
else 
if (document.documentElement && document.documentElement.clientWidth) 
40
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
41
InBlock.gif      theWidth = document.documentElement.clientWidth 
42
InBlock.gif      theHeight = document.documentElement.clientHeight 
43
ExpandedSubBlockEnd.gif    } 
44
InBlock.gif    
else 
if (document.body) 
45
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
46
InBlock.gif      theWidth = document.body.clientWidth 
47
InBlock.gif      theHeight = document.body.clientHeight 
48
ExpandedSubBlockEnd.gif    }
49
InBlock.gif    
50
InBlock.gif       
//
做div居中处理
51
InBlock.gif    
this.msgbox.style.left = (theWidth  - 
this.msgbox.offsetWidth)/2+x;
52
InBlock.gif    
this.msgbox.style.top = (theHeight - 
this.msgbox.offsetHeight)/2+y; 
53
InBlock.gif
54
InBlock.gif      
//
绑定传入的事件
55
InBlock.gif    
this.msgbuttonyes.onclick = YesClick;
//
function(){ alert('yes');};
56
InBlock.gif    
this.msgbuttonno.onclick = NoClick;
57
InBlock.gif      
//
绑定隐藏div的事件,使用prototype类库
58
ExpandedSubBlockStart.gifContractedSubBlock.gif    Event.observe(
this.msgbuttonyes,"click",
function()
dot.gif{KMessageBox.Hide();},
true);
59
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.observe(
this.msgbuttonno,"click",
function()
dot.gif{KMessageBox.Hide();},
true);
60
ExpandedBlockEnd.gif}
   有了显示还需要做隐藏处理,即上面调用的KMessageBox.Hide();
  
 1
None.gifKMessageBox.Hide = 
function()
 2
ExpandedBlockStart.gif
ContractedBlock.gif
dot.gif {
 3
InBlock.gif    
if (!
this.msgbox ) 
return;
 4
InBlock.gif    Element.hide(
this.msgbox);
 5
InBlock.gif    
//
detach 事件,防止IE 内存泄漏
 6
ExpandedSubBlockStart.gifContractedSubBlock.gif    Event.stopObserving(
this.msgbuttonyes,"click",
function()
dot.gif{KMessageBox.Hide();},
true)
 7
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.stopObserving(
this.msgbuttonno,"click",
function()
dot.gif{KMessageBox.Hide();},
true)
 8
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.stopObserving(
this.msgbuttonok,"click",
function()
dot.gif{KMessageBox.Hide();},
true)
 9
ExpandedBlockEnd.gif}
10
None.gif
    至于模拟Alert,就可以模仿ShowConfirm来做了,so easy
   
    ok,整个MessageBox 类看起来已经像模像样了.运行一下...
   
     噫,不对,好像缺了点什么....没错,它不是ShowModal类型的...用户还可以任意点下面的页面元素.
     这个怎么模拟?
     当然还是div了...做一个整个页面大小的div覆盖在所有页面元素之上,MessageBox层之下.
    
     不过有个弊端,div不能覆盖select控件,那只好搬出iframe了..所谓道高一尺魔高一丈
   
 1
ExpandedBlockStart.gif
ContractedBlock.gif
function DialogModal()
dot.gif
 2
InBlock.gif    
this.blankImgHandle = 
null
 3
InBlock.gif    
this.tags = 
new Array("applet", "iframe", "select","object","embed");  
 4
ExpandedBlockEnd.gif}
 5
None.gif
 6
None.gif 
 7
None.gifDialogModal.Show = 
function() 
 8
ExpandedBlockStart.gif
ContractedBlock.gif
dot.gif {     
 9
InBlock.gif
debugger;
10
InBlock.gif        
var NameSpaceURI = "http://www.w3.org/1999/xhtml";
11
InBlock.gif        
this.blankImgHandle = document.createElementNS ? document.createElementNS(NameSpaceURI, "iframe") : document.createElement("iframe") ;
//
iframe
12
InBlock.gif        
this.blankImgHandle.setAttribute("id","blankImgHanldle");
13
ExpandedSubBlockStart.gif
ContractedSubBlock.gif        
with (
this.blankImgHandle.style)
dot.gif
14
InBlock.gif            position = "absolute"; 
15
InBlock.gif            left     = 0; 
16
InBlock.gif            top      = (document.documentElement.scrollTop || document.body.scrollTop); 
17
InBlock.gif            height   = "100%"; //这边用100%在 标准生成的aspx页面好像比起效果,去掉doctype那句就可以,所以我直接设置一个分辨率即1024X768
18
InBlock.gif            width    = "100%"; 
19
InBlock.gif            zIndex   = "9999"; //这个zIndex比页面所有元素大,但是要比MessageBox小,保证MessageBox 不被罩住
20
InBlock.gif            filter   = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=40)"; 
21
InBlock.gif            opacity  = "0.1";             
22
ExpandedSubBlockEnd.gif        }          
23
InBlock.gif         
24
InBlock.gif       document.getElementsByTagName("body").item(0).appendChild(
this.blankImgHandle);         
25
ExpandedBlockEnd.gif   }         
26
None.gif         
27
ExpandedBlockStart.gif
ContractedBlock.gifDialogModal.Close = 
function()
dot.gif {                
28
InBlock.gif      
if (
this.blankImgHandle) 
29
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif
30
InBlock.gif          Element.remove(
this.blankImgHandle);
31
InBlock.gif          
this.blankImgHandle = 
null;
32
ExpandedSubBlockEnd.gif      }             
33
ExpandedBlockEnd.gif  }; 
34
None.gif
    在MessageBox中Show的时候,调用DialogModal.Show,Hide的时候调用DialogModal.Hide 即ok了.
    有了上面的两个Javascript类,我们就可以很好的做服务端的封装了,取到control的dopostback函数,直接传入给ShowConfrim就可以了.
   
1
None.gif
//
ShowConfirm客户端事件
2
None.gif
private 
string JS_CONFIRM = "KMessageBox.ShowConfirm('{0}','{1}','{2}',{3},{4});return false;";
3
None.gif
4
None.gif
//
获取DoPostBack事件,这边还有个难点,怎么取得客户端验证事件,目前我还没有解决
5
None.gifstrOnClickScript = "function(){" + Page.ClientScript.GetPostBackEventReference(control, "") + ";}";
6
None.gif
//
注册MessageBox事件,
7
None.gif control.Attributes["onclick"] += 
string.Format(JS_CONFIRM, 
this.mImgDir, caption, content, strOnClickScript, "function(){}");
源码:
代码插入比较慢,而且经常ShowDialogModal框不返回,晕死.....直接down吧:
ContractedBlock.gif
ExpandedBlockStart.gif
KMessageBox.js
  1
None.gif
  2
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox = 
dot.gif{
  3
InBlock.gif  name: "KMessageBox",
  4
InBlock.gif  capiton : "消息框",
  5
InBlock.gif  content: "提示消息",
  6
InBlock.gif  msgbox : 
null,
  7
InBlock.gif  msgcaptioninfo:
null,
  8
InBlock.gif  msgcontent:
null,
  9
InBlock.gif  msgContenttxtmsg:
null,
 10
InBlock.gif  msgbuttonyes:
null,
 11
InBlock.gif  msbbuttonno:
null,
 12
InBlock.gif  msgico:
null 
 13
ExpandedBlockEnd.gif};
 14
None.gif
 15
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox.init = function () 
dot.gif{
 16
InBlock.gif    var msgNameSpaceURI = "http://www.w3.org/1999/xhtml";
 17
InBlock.gif    
 18
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContainerID)
dot.gif{ var msgContainerID= "KMessageBox"; }
 19
InBlock.gif
 20
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgCaptionID)
dot.gif{ var msgCaptionID= "KMessageBox_caption"; }
 21
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgCaptionInfoID)
dot.gif{var msgCaptionInfoID = "KMessageBox_caption_info";}
 22
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentID)
dot.gif{ var msgContentID = "KMessageBox_content"; }
 23
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentTxtID)
dot.gif{ var msgContentTxtID= "KMessageBox_content_txt"; }
 24
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentTxtICOID)
dot.gif{var msgContentTxtICOID="KMessageBox_content_txt_ico"};
 25
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContentTxtMsgID)
dot.gif{var msgContentTxtMsgID="KMessageBox_content_txt_msg"};
 26
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtons)
dot.gif{var msgButtonsID="KMessageBox_buttons"};
 27
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtonYes)
dot.gif{var msgButtonYesID="KMessageBox_buttons_yes"};
 28
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtonNo)
dot.gif{var msgButtonNoID="KMessageBox_buttons_no"};    
 29
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgButtonOK)
dot.gif{var msgButtonOKID="KMessageBox_buttons_ok"};    
 30
InBlock.gif
 31
InBlock.gif    var msgContainer = $(msgContainerID);
 32
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContainer) 
dot.gif{
 33
InBlock.gif      msgContainer = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div");
 34
InBlock.gif      msgContainer.setAttribute("id", msgContainerID);
 35
InBlock.gif      msgContainer.setAttribute("style","MARGIN: 0px auto; POSITION: absolute; TEXT-ALIGN: center;");
 36
InBlock.gif
 37
InBlock.gif
 38
InBlock.gif    var msgCaption = $(msgCaptionID);
 39
InBlock.gif
 40
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgCaption)
dot.gif{
 41
InBlock.gif      msgCaption = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 42
InBlock.gif      msgCaption.setAttribute("id",msgCaptionID);
 43
InBlock.gif      Element.addClassName(msgCaption,"caption");      
 44
InBlock.gif
 45
InBlock.gif      
 46
InBlock.gif      var msgCaptionInfo = $(msgCaptionInfoID);
 47
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
if(!msgCaptionInfo)
dot.gif{
 48
InBlock.gif      msgCaptionInfo = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 49
InBlock.gif      msgCaptionInfo.setAttribute("id",msgCaptionInfoID);
 50
InBlock.gif      Element.addClassName(msgCaptionInfo,"info");
 51
InBlock.gif      msgCaption.appendChild(msgCaptionInfo);
 52
ExpandedSubBlockEnd.gif      }
 53
InBlock.gif      msgContainer.appendChild(msgCaption);
 54
InBlock.gif      
 55
ExpandedSubBlockEnd.gif    }
 56
InBlock.gif    
 57
InBlock.gif    var msgContent = $(msgContentID);
 58
InBlock.gif
 59
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
if(!msgContent)
dot.gif{
 60
InBlock.gif      msgContent= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 61
InBlock.gif      msgContent.setAttribute("id",msgContentID);
 62
InBlock.gif      Element.addClassName(msgContent,"content");
 63
InBlock.gif      
 64
InBlock.gif      var msgContentTxt = $(msgContentTxtID);
 65
InBlock.gif      
 66
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
if(!msgContentTxt )
dot.gif{
 67
InBlock.gif      msgContentTxt = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 68
InBlock.gif      msgContentTxt.setAttribute("id",msgContentTxtID);
 69
InBlock.gif      Element.addClassName(msgContentTxt,"txt");
 70
InBlock.gif           
 71
InBlock.gif      var msgContentTxtICO = $(msgContentTxtICOID);
 72
InBlock.gif      
if(!msgContentTxtICO)
 73
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif{
 74
InBlock.gif         msgContentTxtICO= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "img") : document.createElement("img") ;
 75
InBlock.gif         msgContentTxtICO.setAttribute("id",msgContentTxtICOID);
 76
InBlock.gif         msgContentTxtICO.setAttribute("src","icon_alarm.gif");
 77
InBlock.gif         msgContentTxtICO.setAttribute("align","absMiddle");
 78
InBlock.gif         msgContentTxtICO.setAttribute("style","height:52px;width:64px;background-image:url('icon_big_info.gif');");
 79
InBlock.gif         msgContentTxt.appendChild(msgContentTxtICO);
 80
ExpandedSubBlockEnd.gif      }
 81
InBlock.gif      
 82
InBlock.gif      var msgContentTxtMsg= $(msgContentTxtMsgID);
 83
InBlock.gif      
if(!msgContentTxtMsg)
 84
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif{
 85
InBlock.gif         msgContentTxtMsg= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "span") : document.createElement("span") ;
 86
InBlock.gif         msgContentTxtMsg.setAttribute("id",msgContentTxtMsgID);
 87
InBlock.gif         
 88
InBlock.gif         msgContentTxt.appendChild(msgContentTxtMsg);
 89
ExpandedSubBlockEnd.gif      }
 90
InBlock.gif
 91
InBlock.gif
 92
InBlock.gif      var msgButtons = $(msgButtonsID);
 93
InBlock.gif      
if(!msgButtons)
 94
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif{
 95
InBlock.gif         msgButtons = document.createElementNS ? document.createElementNS(msgNameSpaceURI, "div") : document.createElement("div") ;
 96
InBlock.gif         msgButtons.setAttribute("id",msgButtonsID);
 97
InBlock.gif         Element.addClassName(msgButtons,"btnlist");
 98
InBlock.gif         var msgButtonYes = $(msgButtonYesID);
 99
InBlock.gif          
if(!msgButtonYes)
100
ExpandedSubBlockStart.gif
ContractedSubBlock.gif          
dot.gif{
101
InBlock.gif            msgButtonYes= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "input") : document.createElement("input") ;
102
InBlock.gif            msgButtonYes.setAttribute("id",msgButtonYesID);
103
InBlock.gif            msgButtonYes.setAttribute("type","button");
104
InBlock.gif            msgButtonYes.setAttribute("value","YES");
105
InBlock.gif            Element.addClassName(msgButtonYes,"input_set");
106
InBlock.gif                    
107
InBlock.gif            msgButtons.appendChild(msgButtonYes);             
108
ExpandedSubBlockEnd.gif         }
109
InBlock.gif
110
InBlock.gif         var msgButtonNo = $(msgButtonNoID);
111
InBlock.gif          
if(!msgButtonNo)
112
ExpandedSubBlockStart.gif
ContractedSubBlock.gif          
dot.gif{
113
InBlock.gif            msgButtonNo= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "input") : document.createElement("input") ;
114
InBlock.gif            msgButtonNo.setAttribute("id",msgButtonNoID);
115
InBlock.gif            msgButtonNo.setAttribute("type","button");
116
InBlock.gif            msgButtonNo.setAttribute("value","NO");
117
InBlock.gif            Element.addClassName(msgButtonNo,"input_set");
118
InBlock.gif            
119
InBlock.gif            msgButtons.appendChild(msgButtonNo); 
120
InBlock.gif            
121
ExpandedSubBlockEnd.gif         }
122
InBlock.gif         
123
InBlock.gif         var msgButtonOK= $(msgButtonOKID);
124
InBlock.gif          
if(!msgButtonOK)
125
ExpandedSubBlockStart.gif
ContractedSubBlock.gif          
dot.gif{
126
InBlock.gif            msgButtonOK= document.createElementNS ? document.createElementNS(msgNameSpaceURI, "input") : document.createElement("input") ;
127
InBlock.gif            msgButtonOK.setAttribute("id",msgButtonOKID);
128
InBlock.gif            msgButtonOK.setAttribute("type","button");
129
InBlock.gif            msgButtonOK.setAttribute("value","OK");
130
InBlock.gif            Element.addClassName(msgButtonOK,"input_set");
131
InBlock.gif            
132
InBlock.gif            msgButtons.appendChild(msgButtonOK); 
133
InBlock.gif            
134
ExpandedSubBlockEnd.gif         }
135
InBlock.gif
136
InBlock.gif
137
InBlock.gif         msgContentTxt.appendChild(msgButtons);
138
ExpandedSubBlockEnd.gif      }
139
InBlock.gif      
140
InBlock.gif      msgContent.appendChild(msgContentTxt);
141
ExpandedSubBlockEnd.gif      }
142
InBlock.gif
143
InBlock.gif      
144
InBlock.gif      msgContainer.appendChild(msgContent);
145
ExpandedSubBlockEnd.gif    }
146
InBlock.gif
147
InBlock.gif     document.getElementsByTagName("body").item(0).appendChild(msgContainer);
148
ExpandedSubBlockEnd.gif    }
149
InBlock.gif       
150
InBlock.gif    
this.msgbox = $(
this.name);
151
InBlock.gif    
this.msgcaptioninfo = $(msgCaptionInfoID);
152
InBlock.gif    
this.msgContenttxtmsg= $(msgContentTxtMsgID);
153
InBlock.gif    
this.msgbuttonyes = $(msgButtonYesID);
154
InBlock.gif    
this.msgbuttonno = $(msgButtonNoID);
155
InBlock.gif    
this.msgbuttonok = $(msgButtonOKID);
156
InBlock.gif    
this.msgico = $(msgContentTxtICOID);
157
InBlock.gif    Element.hide(
this.msgbox);
158
InBlock.gif   
159
ExpandedBlockEnd.gif}
160
None.gif
161
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox.ShowConfirm = function (imgdir,caption,msg,YesClick,NoClick) 
dot.gif{
162
InBlock.gif    
163
InBlock.gif    
if (!
this.msgbox ) 
return;
164
InBlock.gif    
//
alert(document.body.style.overflowY);
165
InBlock.gif    DialogModal.Show();
166
InBlock.gif    
167
InBlock.gif    
this.msgcaptioninfo.innerHTML = caption;
168
InBlock.gif    
this.msgContenttxtmsg.innerHTML = msg;
169
InBlock.gif    
if(imgdir != "")
170
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif{
171
InBlock.gif       
this.msgico.setAttribute("src",imgdir+"/kinnsoft_client/KMessageBox/icon_alarm.gif");
172
ExpandedSubBlockEnd.gif    }
173
InBlock.gif    
else
174
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif{
175
InBlock.gif       
this.msgico.setAttribute("src","/kinnsoft_client/KMessageBox/icon_alarm.gif");
176
ExpandedSubBlockEnd.gif    }
177
InBlock.gif    
178
InBlock.gif    Element.show(
this.msgbox);
179
InBlock.gif    Element.show(
this.msgbuttonyes);
180
InBlock.gif    Element.show(
this.msgbuttonno);
181
InBlock.gif    Element.hide(
this.msgbuttonok);
182
InBlock.gif    
183
InBlock.gif    var x=0,y=0;
184
InBlock.gif    x = (document.documentElement.scrollLeft || document.body.scrollLeft);
185
InBlock.gif    y = (document.documentElement.scrollTop || document.body.scrollTop);
186
InBlock.gif    
187
InBlock.gif    var theWidth=0,theHeight=0;
188
InBlock.gif    
189
InBlock.gif    
if (window.innerWidth) 
190
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
191
InBlock.gif      theWidth = window.innerWidth 
192
InBlock.gif      theHeight = window.innerHeight 
193
ExpandedSubBlockEnd.gif    } 
194
InBlock.gif    
else 
if (document.documentElement && document.documentElement.clientWidth) 
195
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
196
InBlock.gif      theWidth = document.documentElement.clientWidth 
197
InBlock.gif      theHeight = document.documentElement.clientHeight 
198
ExpandedSubBlockEnd.gif    } 
199
InBlock.gif    
else 
if (document.body) 
200
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
201
InBlock.gif      theWidth = document.body.clientWidth 
202
InBlock.gif      theHeight = document.body.clientHeight 
203
ExpandedSubBlockEnd.gif    }
204
InBlock.gif    
205
InBlock.gif    
this.msgbox.style.left = (theWidth  - 
this.msgbox.offsetWidth)/2+x;
206
InBlock.gif    
this.msgbox.style.top = (theHeight - 
this.msgbox.offsetHeight)/2+y; 
207
InBlock.gif
208
InBlock.gif    
this.msgbuttonyes.onclick = YesClick;
//
function(){ alert('yes');};
209
InBlock.gif    
this.msgbuttonno.onclick = NoClick;
210
InBlock.gif
211
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.observe(
this.msgbuttonyes,"click",function()
dot.gif{KMessageBox.Hide();},
true);
212
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.observe(
this.msgbuttonno,"click",function()
dot.gif{KMessageBox.Hide();},
true);
213
ExpandedBlockEnd.gif}
214
None.gif
215
ExpandedBlockStart.gif
ContractedBlock.gifKMessageBox.ShowInfo = function (imgdir,caption,msg) 
dot.gif{
216
InBlock.gif    
217
InBlock.gif    
if (!
this.msgbox ) 
return;    
218
InBlock.gif    DialogModal.Show();
219
InBlock.gif    
220
InBlock.gif    
if(imgdir != "")
221
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif{
222
InBlock.gif       
this.msgico.setAttribute("src",imgdir+"/kinnsoft_client/KMessageBox/icon_big_info.gif");
223
ExpandedSubBlockEnd.gif    }
224
InBlock.gif    
else
225
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif{
226
InBlock.gif       
this.msgico.setAttribute("src","/kinnsoft_client/KMessageBox/icon_big_info.gif");
227
ExpandedSubBlockEnd.gif    }
228
InBlock.gif    
229
InBlock.gif    
this.msgcaptioninfo.innerHTML = caption;
230
InBlock.gif    
this.msgContenttxtmsg.innerHTML = msg;
231
InBlock.gif    Element.show(
this.msgbox);
232
InBlock.gif    Element.show(
this.msgbuttonok);
233
InBlock.gif    Element.hide(
this.msgbuttonyes);
234
InBlock.gif    Element.hide(
this.msgbuttonno);
235
InBlock.gif    
236
InBlock.gif    var x=0,y=0;
237
InBlock.gif    x = (document.documentElement.scrollLeft || document.body.scrollLeft);
238
InBlock.gif    y = (document.documentElement.scrollTop || document.body.scrollTop);
239
InBlock.gif    
240
InBlock.gif    var theWidth=0,theHeight=0;
241
InBlock.gif    
242
InBlock.gif    
if (window.innerWidth) 
243
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
244
InBlock.gif      theWidth = window.innerWidth 
245
InBlock.gif      theHeight = window.innerHeight 
246
ExpandedSubBlockEnd.gif    } 
247
InBlock.gif    
else 
if (document.documentElement && document.documentElement.clientWidth) 
248
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
249
InBlock.gif      theWidth = document.documentElement.clientWidth 
250
InBlock.gif      theHeight = document.documentElement.clientHeight 
251
ExpandedSubBlockEnd.gif    } 
252
InBlock.gif    
else 
if (document.body) 
253
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    
dot.gif
254
InBlock.gif      theWidth = document.body.clientWidth 
255
InBlock.gif      theHeight = document.body.clientHeight 
256
ExpandedSubBlockEnd.gif    }
257
InBlock.gif    
258
InBlock.gif    
this.msgbox.style.left = (theWidth  - 
this.msgbox.offsetWidth)/2+x;
259
InBlock.gif    
this.msgbox.style.top = (theHeight - 
this.msgbox.offsetHeight)/2+y; 
260
InBlock.gif
261
InBlock.gif    
262
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.observe(
this.msgbuttonok,"click",function()
dot.gif{KMessageBox.Hide();},
true);
263
ExpandedBlockEnd.gif}
264
None.gif
265
None.gif
266
None.gifKMessageBox.Hide = function()
267
ExpandedBlockStart.gif
ContractedBlock.gif
dot.gif{
268
InBlock.gif    
if (!
this.msgbox ) 
return;
269
InBlock.gif    Element.hide(
this.msgbox);
270
InBlock.gif    DialogModal.Close();
271
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.stopObserving(
this.msgbuttonyes,"click",function()
dot.gif{KMessageBox.Hide();},
true)
272
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.stopObserving(
this.msgbuttonno,"click",function()
dot.gif{KMessageBox.Hide();},
true)
273
ExpandedSubBlockStart.gif
ContractedSubBlock.gif    Event.stopObserving(
this.msgbuttonok,"click",function()
dot.gif{KMessageBox.Hide();},
true)
274
ExpandedBlockEnd.gif}
275
None.gif
276
None.gif
277
ExpandedBlockStart.gif
ContractedBlock.giffunction DialogModal()
dot.gif
278
InBlock.gif    
this.blankImgHandle = 
null
279
InBlock.gif    
this.tags = 
new Array("applet", "iframe", "select","object","embed");  
280
ExpandedBlockEnd.gif}
281
None.gif
282
None.gif 
283
None.gifDialogModal.Show = function() 
284
ExpandedBlockStart.gif
ContractedBlock.gif
dot.gif{     
285
InBlock.gifdebugger;
286
InBlock.gif        var NameSpaceURI = "http://www.w3.org/1999/xhtml";
287
InBlock.gif        
this.blankImgHandle = document.createElementNS ? document.createElementNS(NameSpaceURI, "iframe") : document.createElement("iframe") ;
//
iframe
288
InBlock.gif        
this.blankImgHandle.setAttribute("id","blankImgHanldle");
289
ExpandedSubBlockStart.gif
ContractedSubBlock.gif        with (
this.blankImgHandle.style)
dot.gif
290
InBlock.gif            position = "absolute"; 
291
InBlock.gif            left     = 0; 
292
InBlock.gif            top      = (document.documentElement.scrollTop || document.body.scrollTop); 
293
InBlock.gif            height   = "100%"; 
294
InBlock.gif            width    = "100%"; 
295
InBlock.gif            zIndex   = "9999"; 
296
InBlock.gif            filter   = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=40)"; 
297
InBlock.gif            opacity  = "0.1";             
298
ExpandedSubBlockEnd.gif        }          
299
InBlock.gif         
300
InBlock.gif       document.getElementsByTagName("body").item(0).appendChild(
this.blankImgHandle);         
301
ExpandedBlockEnd.gif   }         
302
None.gif         
303
ExpandedBlockStart.gif
ContractedBlock.gifDialogModal.Close = function()
dot.gif{                
304
InBlock.gif      
if (
this.blankImgHandle) 
305
ExpandedSubBlockStart.gif
ContractedSubBlock.gif      
dot.gif
306
InBlock.gif          Element.remove(
this.blankImgHandle);
307
InBlock.gif          
this.blankImgHandle = 
null;
308
ExpandedSubBlockEnd.gif      }             
309
ExpandedBlockEnd.gif  }; 
310
None.gif
311
None.gif
312
ExpandedBlockStart.gif
ContractedBlock.gifEvent.observe(window, 'load', function(e)
dot.gif{KMessageBox.init();}, 
false);
313
None.gifEvent.observe(window, 'unload', Event.unloadCache, 
false);

 

ContractedBlock.gif
ExpandedBlockStart.gif
KMessageBox.css
 1
None.gif
 2
None.gif#KMessageBox
 3
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
 4
InBlock.gif margin:
0px auto;
 5
InBlock.gif width :
398px;
 6
InBlock.gif height:
188px;
 7
InBlock.gif border:
1px solid #498AC2;
 8
InBlock.gif font-size:
9pt;
 9
InBlock.gif position:
absolute;
10
InBlock.gif z-index:
 10000 ;
11
ExpandedBlockEnd.gif}
12
None.gif
13
None.gif
14
None.gif#KMessageBox .caption
15
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
16
InBlock.giffont-family:
'tahoma';
17
InBlock.giffont-size:
8pt;
18
InBlock.gifbackground:
#45A0EE url('alter_bar.gif') no-repeat;
19
InBlock.gifheight:
28px;
20
InBlock.giftext-align:
left;
21
ExpandedBlockEnd.gif}
22
None.gif#KMessageBox .info
23
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
24
InBlock.giffloat:
left;
25
InBlock.gifcolor:
#fff;
26
InBlock.giffont-weight:
bold;
27
InBlock.gifmargin:
8px 0 0 8px;
28
ExpandedBlockEnd.gif}
29
None.gif#KMessageBox .content
30
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
31
InBlock.giffont-family:
'tahoma';
32
InBlock.giffont-size:
8pt;
33
InBlock.gifwidth:
396px;
34
InBlock.gifword-break:
break-all;
35
InBlock.gifheight:
157px;
36
InBlock.gifborder:
1px solid #fff;
37
InBlock.gifbackground:
#fff url('alter_bg.gif') repeat-x;
38
ExpandedBlockEnd.gif}
39
None.gif#KMessageBox .txt
40
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
41
InBlock.gifmargin-top:
25px;
42
InBlock.giftext-align:
center;
43
InBlock.gifcolor:
#327FC6;
44
InBlock.gifpadding:
0 12px;
45
InBlock.gifline-height:
22px;
46
ExpandedBlockEnd.gif}
47
None.gif.txt
48
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
49
InBlock.giffont-family:
tahoma;
50
InBlock.giffont-size:
11px;
51
InBlock.giffont-weight:
normal;
52
ExpandedBlockEnd.gif}
53
ExpandedBlockStart.gifContractedBlock.gifimg
{
dot.gif}
{
border:
0}
54
None.gif#KMessageBox .btnlist
55
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
margin-top:
30px;
text-align:
center;}
56
None.gif
57
None.gif#KMessageBox .input_set
58
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
59
InBlock.gifborder-style:
 none;
60
InBlock.gif    border-color:
 inherit;
61
InBlock.gif    border-width:
 0;
62
InBlock.gif    font-size:
9pt;
    width:
63px;
    height:
22px;
background:
url('compose.gif') no-repeat -154px -22px;
63
ExpandedBlockEnd.gif}
64
None.gif.input_set
65
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
66
InBlock.gif    width:
50%;
67
InBlock.gif    height:
17px!important;
height :
21px;
68
InBlock.gif    border:
1px solid #7F9DB9;
69
InBlock.gif    padding:
3px 2px 0 2px!important;
70
ExpandedSubBlockStart.gifContractedSubBlock.gif    padding 
/**/
/**/:
3px 2px 1px 2px;
71
InBlock.gif    color:
#494949;
72
ExpandedBlockEnd.gif}
73
None.gif
74
None.gif
75
None.gif.input_Alist
76
ExpandedBlockStart.gifContractedBlock.gif
{
dot.gif}
{
  
77
InBlock.gif    border-style :
 none;
78
InBlock.gif    border-color:
 inherit;
79
InBlock.gif    border-width:
 0;
80
InBlock.gif    width:
85px;
    height:
22px;
background:
#fff url('input_bg_alist.gif') no-repeat;
81
InBlock.gif    float:
left;
                
82
ExpandedBlockEnd.gif}
分类: ,
本文转自浪子博客园博客,原文链接:http://www.cnblogs.com/walkingboy/archive/2006/08/10/Cilent_KMessageBox.html,如需转载请自行联系原作者
你可能感兴趣的文章
[Fibre Channle 实战之三]FC 和iSCSI的使用差异
查看>>
c#winform选择文件,文件夹,打开指定目录方法
查看>>
traceroute
查看>>
如何划分man文档的章节
查看>>
微信公众号的分类
查看>>
分布式高可用存储(drbd+corosync+pacemaker+MooseFS)
查看>>
css3动画简介以及动画库animate.css的使用
查看>>
后台管理前端选型
查看>>
Nginx+Lua+Redis连接池
查看>>
hadoop编译
查看>>
Favicon
查看>>
ubuntu下安装与卸载软件方法-转载
查看>>
LeetCode]Integer to Roman AND ROman to Integer
查看>>
关于datepart计算weekday时多一天引起的问题及解决方法
查看>>
MySQL python 数据迁移脚本
查看>>
我的友情链接
查看>>
网站运维常用小技巧,排错必备
查看>>
Python中MySQLdb模块的安装
查看>>
windows下的grep
查看>>
find 详解
查看>>