仿QQ弹出消息提示

< html >
 
< head >
  
 
head >
 
 
< script language  = javascript >
   
var  titlePopup
   
var  len;
   
   
function  InitMsgBox()
   

       len 
= 0;
    titlePopup
=window.createPopup();
    
var titlePopupBody = titlePopup.document.body;
    titlePopupBody.style.border 
="solid black 1px";
    
var titleContent = "";
    titleContent 
= titleContent + "";
    titleContent 
= titleContent + "消息提醒";
    titleContent 
= titleContent + "内容";
    titleContent 
= titleContent + "内容";
    titleContent 
= titleContent + "日期";
    titleContent 
= titleContent + "";    
    titlePopupBody.innerHTML 
= titleContent;
         
    ShowMsgBox();
    
   }

      
   
function  MsgBox()
   

    
//alert(len)
    len += 4;      
    
if (len > 110)
    
{   
     
//window.clearInterval(tID);     
    }
        
    
else
    
{//200固定了消息提示框的宽度
     titlePopup.show(document.body.clientWidth, document.body.clientHeight, 200, len, top.document.body); 
    }
    
   }

   
   
var  tID
   
function  ShowMsgBox()
   
{
    tID 
= window.setInterval("MsgBox()",30);    
   }

 
script >
 
 
< body MS_POSITIONING = " GridLayout " >
  
< INPUT onclick = " InitMsgBox() "  id = " Button1 "  type = " button "
   value
= " Button "  name = " Button1 " >
 
body >
html >  
 

你可能感兴趣的:(javascript)