加一个IFRAME,不断刷新它。
if (条件)
{
sp1.InnerHtml="<marquee behavior=scroll direction=left width=300 height=18 scrollamount=1 scrolldelay=15 onMouseOver='this.stop()' onMouseOut='this.start()'><P align='right'><img src='image/mail.gif' width='26' height='16'align='absmiddle' border='0'><FONT color='#ffffff' size='2'><a href=# OnClick=winOpen('"+ Session["PersonNo"].ToString()+"') >您有<Font color='red'><strong>"+intCount+"</strong></Font>条未读的短信,请注意查收!</a></FONT></P></marquee><embed src='../MyWork/Messages/music/message.mid' width='0' height=0 id=music autostart=true></embed>";
string jsStr;
string winstr;
string strMessages="hi,Wellcome here!";
jsStr="<script language=JavaScript type=text/JavaScript>";
jsStr+="if(window.navigator.appVersion.indexOf(6.0)!=-1){ ";
jsStr+="var oPopup = window.createPopup();";
jsStr+="var popTop=50;";
jsStr+="function popmsg(msgstr){";
winstr="<TABLE style='font-size: 12px; z-index: 101; left: 0; width: 100%; cursor: default; position: absolute; top: 0; height: 100%; margin: 0px; padding: 0px' borderColor='black' height='178' cellSpacing='0' borderColorDark='#ffffff' cellPadding='0' width='320' bgColor='#efffef' border='1'>";
winstr+="<TR>";
winstr+="<TD style='WIDTH: 100%; HEIGHT: 20px; BACKGROUND-COLOR: #6dc3fb; vAlign: bottom align=center bgColor=mediumblue color=#000000' vAlign= 'bottom' align='center' colSpan='1' rowSpan='1'>";
winstr+="<p align='center'>";
//winstr+="<button tabindex='-1' οnclick="parent.oPopup.hide();" style="border:1px solid black; border-left:1px solid white; border-top:1px solid white; background:#6dc3fb ">close</button>";
winstr+="<FONT color='#FFFFFF'><B>Message</B></FONT>";
winstr+="</p>";
winstr+="</TD>";
winstr+="</TR>";
winstr+="</TR>";
winstr+="<TD align='center' style='WIDTH: 100%'><FONT color='red'>Message:</FONT>"+strMessages+"</TD>";
winstr+="</TR>";
winstr+="</TABLE>";
jsStr+="winstr="+(char)34+winstr+(char)34+";";
jsStr+="oPopup.document.body.innerHTML = winstr;";
jsStr+="popshow();}";
jsStr+="function popshow(){";
//window.status=popTop;
jsStr+="if(popTop>1720){";
jsStr+="clearTimeout(mytime);";
jsStr+="oPopup.hide();";
jsStr+="return;";
jsStr+="}else if(popTop>1520&&popTop<1720){";
jsStr+="oPopup.show(screen.width-218,screen.height,200,1720-popTop);";
jsStr+="}else if(popTop>1500&&popTop<1520){";
jsStr+="oPopup.show(screen.width-218,screen.height+(popTop-1720),200,150);";
jsStr+="}else if(popTop<180){";
jsStr+="oPopup.show(screen.width-218,screen.height,200,popTop);";
jsStr+="}else if(popTop<220){";
jsStr+="oPopup.show(screen.width-218,screen.height-popTop,200,150);";
jsStr+="}";
jsStr+="popTop+=10;";
string sTep="' popshow();'";
jsStr+="var mytime=setTimeout("+sTep+",50);";
jsStr+="}";
jsStr+="popmsg(msg);";
jsStr+="}";
jsStr+="</script>";
Page.Response.Write(jsStr);
}