Many people asked me how the message was made by a Web text message similar to MSN. Code , May not be too good, but you have to do it yourself, I believe it will make better results, the code is pasted as follows:
<SCRIPT>
VaR opopup = Window. createpopup ();
VaR PopTop = 50;
Function popmsg (msgstr ){
VaR winstr = "<Table Style = \" border: 1 solid # ffa6ca \ "width = \" 241 \ "Height = \" 172 \ "border = \" 0 \ "cellpadding = \" 0 \ "cellspacing = \" 0 \ "background = \" http://www.blueidea.com/articleimg/2004/01/1576/04-s.jpg\ "> ";
Winstr + = "<tr> <TD Height = \" 30 \ "> </TD> </tr> <TD align = \" center \ "> <Table width = \ "90% \" Height = \ "110 \" border = \ "0 \" cellpadding = \ "0 \" cellspacing = \ "0 \"> ";
Winstr + = "<tr> <TD valign = \" Top \ "style = \" font-size: 12px; color: red; face: tahoma \ ">" + msgstr + "</TD> </tr> </table> ";
Opopup.doc ument. Body. innerhtml = winstr;
Popshow ();
}
Function popshow (){
Window. Status = PopTop;
If (PopTop & gt; 1720 ){
Cleartimeout (mytime );
Opopup. Hide ();
Return;
} Else if (PopTop> 1520 & PopTop <1720 ){
Opopup. Show (screen. Width-250, screen. Height, 241,1720-poptop );
} Else if (PopTop> 1500 & PopTop <1520 ){
Opopup. Show (screen. Width-250, screen. height + (popTop-1720), 241,172 );
} Else if (PopTop <180 ){
Opopup. Show (screen. Width-250, screen. Height, 241, PopTop );
} Else if (PopTop <220 ){
Opopup. Show (screen. Width-250, screen. Height-PopTop, 241,172 );
}
PoPToP + = 10;
VaR mytime = setTimeout ("popshow ();", 50 );
}
Popmsg (" welcome to the blue ideal, A large number of design resources are waiting for you! If you have any questions, go to the classic forum. ");
</SCRIPT>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service