男孩女孩好听名字大全:Ext消息提示框,显示几秒后自动消失

来源:百度文库 编辑:偶看新闻 时间:2024/05/06 02:11:52

封装一个Ext消息提示框,显示几秒后自动消失

分类: Ext 2009-12-23 22:11 2842人阅读 评论(4) 收藏 举报

最近项目需要,封装了一个Ext消息提示框,提示信息显示几秒后就自动消失。

 

css代码:

 

view plaincopy to clipboardprint?

  1. .msg .x-box-mc {  
  2. font-size:14px;  
  3. }  
  4. #msg-div {  
  5.     position:absolute;  
  6.     left:650px;  
  7.     top:410px;  
  8.     width:600px;  
  9.     z-index:20000;  
  10. }  
  11. .msg-close{  
  12. width:10px; height:10px; position:absolute; top:1px; right:10px;cursor:hand;  
  13. }  
  14. .msg-h3 {  
  15. font-size:13px;  
  16.     color:#2870b2;  
  17.     font-weight:bold;  
  18.     margin:10px 0;  
  19. }  

 

js代码:

view plaincopy to clipboardprint?

  1. /** 
  2.  *信息提示框,显示后迅速消失 
  3.  */  
  4. Ext.QuickMsg = function(){  
  5.     var msgCt;  
  6.   
  7.     function createBox(t, s,isClose){  
  8.                 var html = new Array();  
  9.   
  10.                 html.push('');  
  11.                 html.push('');  
  12.                 html.push('
');  
  •                 html.push('');  
  •                 if(t){  
  •                         html.push('');  
  •                         html.push(t);  
  •                         html.push('');  
  •                 }  
  •                 if(isClose){  
  •                         html.push('');  
  •                 }  
  •                 html.push(s);  
  •                 html.push('