我见过一个例子,基本思路是加一个timer,不断的调整窗体的位置。上升到最高点停留片刻,然后降低窗体的位置。至于链接嘛,更是esay了。你写个lable,写个事件……form有个move方法啊。

解决方案 »

  1.   

    不好意思,我以为是vb板块的问题呢。
    用javascript的话,你可以去www.eyou.com,那里有个例子。
      

  2.   

    to:hello找我
    不要这么吝啬马,我也是个菜鸟哦,这里的规矩不是很明白的,还希望高手多多帮忙哦。
      

  3.   

    http://www.9iv.com/down/这里也有类似的效果
      

  4.   

    海娃的
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="Keywords" content="51windows.Net">
    <META NAME="Author" CONTENT="haiwa">
    <title>类似MSN提示的页面效果-51windows.Net-www.51windows.Net</title>
    </head><body scroll=no>
    看到右下角的提示了吗?如果没有看到,<button onclick=location.reload();>刷新</button>一下
    <script language="JavaScript">
    window.onload = getMsg;
    window.onresize = resizeDiv;
    window.onerror = function(){}
    //短信提示使用(asilas添加)
    var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
    function getMsg()
    {
    try{
    divTop = parseInt(document.getElementById("eMeng").style.top,10)
    divLeft = parseInt(document.getElementById("eMeng").style.left,10)
    divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
    divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
    document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;//  divHeight
    document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
    document.getElementById("eMeng").style.visibility="visible"
    objTimer = window.setInterval("moveDiv()",10)
    }
    catch(e){}
    }function resizeDiv()
    {
    i+=1
    if(i>500) closeDiv()
    try{
    divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
    divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
    document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
    document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
    }
    catch(e){}
    }function moveDiv()
    {
    try
    {
    if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
    {
    window.clearInterval(objTimer)
    objTimer = window.setInterval("resizeDiv()",1)
    }
    divTop = parseInt(document.getElementById("eMeng").style.top,10)
    document.getElementById("eMeng").style.top = divTop - 1
    }
    catch(e){}
    }
    function closeDiv()
    {
    document.getElementById('eMeng').style.visibility='hidden';
    if(objTimer) window.clearInterval(objTimer)
    }
    </script>
    <DIV id=eMeng style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX:99999; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 180px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 116px; BACKGROUND-COLOR: #c9d3f3">
    <TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0>
    <TBODY>
    <TR>
    <TD style="FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #0f2c8c" width=30 height=24></TD>
    <TD style="FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #1f336b; PADDING-TOP: 4px;PADDING-left: 4px" vAlign=center width="100%"> 短消息提示:</TD>
    <TD style="BACKGROUND-IMAGE: url(msgTopBg.gif); PADDING-TOP: 2px;PADDING-right:2px" vAlign=center align=right width=19><span title=关闭 style="CURSOR: hand;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick=closeDiv() >×</span><!-- <IMG title=关闭 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg"> --></TD>
    </TR>
    <TR>
    <TD style="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: url(1msgBottomBg.jpg); PADDING-BOTTOM: 1px" colSpan=3 height=90>
    <DIV style="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%">您有<font color=#FF0000>1</font>封新短消息<BR><BR>
    <DIV align=center style="word-break:break-all"><a href="javascript:alert('你好')"><font color=#FF0000>点击查看短信</font></a></DIV </DIV>
    </TD>
    </TR>
    </TBODY>
    </TABLE>
    </DIV>
    </body></html> 
    <div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand;z-index:100000;font:menu;">
     <A href="http://www.51windows.Net/?js" target=_blank><FONT color=red> My Js Collection!</FONT></A><br><input type="button" name="Button" value="源代码" onClick= 'window.location = "view-source:" + window.location.href'><SCRIPT LANGUAGE="JavaScript" src="/log/sitelog.asp"></SCRIPT></div>
    <!-- 海娃@[email protected]@无忧视窗@http://www.51windows.net -->
      

  5.   

    在要加载页面加上:<!--#include file="PopupWin.asp"-->
    PopupWin.asp文件代码如下:
    <script type="text/javascript">
          //<![CDATA[
            var PopupWin1oldonloadHndlr=window.onload, PopupWin1popupHgt, PopupWin1actualHgt, PopupWin1tmrId=-1, PopupWin1resetTimer;
            var PopupWin1titHgt, PopupWin1cntDelta, PopupWin1tmrHide=-1, PopupWin1hideAfter=50000, PopupWin1hideAlpha, PopupWin1hasFilters=true;
            var PopupWin1nWin, PopupWin1showBy=null, PopupWin1dxTimer=-1, PopupWin1popupBottom;        var PopupWin1nText,PopupWin1nMsg,PopupWin1nTitle,PopupWin1bChangeTexts=false;        window.onload=PopupWin1espopup_winLoad;
            PopupWin1nText="<head><title>系统公告</title><style type=\"text/css\">body {    background:#E0E9F8; padding:5px;    filter:progid:DXImageTransform.Microsoft.Gradient(     GradientType=0,StartColorStr='#FFE0E9F8', EndColorStr='#FFFFFFFF');  }  h1 {    font:bold 16px arial,sans-serif; color:#1F336B;     text-align:center; margin:0px;  }  p {    font:14px arial,sans-serif; color:#1F336B;  }</style></head><body><h1></h1><p>Text to display in new window.</p></body>";
            
            function PopupWin1espopup_ShowPopup(show)
            {
              if (PopupWin1dxTimer!=-1) { el.filters.blendTrans.stop(); }          if ((PopupWin1tmrHide!=-1) && ((show!=null) && (show==PopupWin1showBy)))
              {
                clearInterval(PopupWin1tmrHide);
                PopupWin1tmrHide=setInterval(PopupWin1espopup_tmrHideTimer,PopupWin1hideAfter);
                return;
              }
              if (PopupWin1tmrId!=-1) return;
              PopupWin1showBy=show;          elCnt=document.getElementById('PopupWin1_content')
              elTit=document.getElementById('PopupWin1_header');
              el=document.getElementById('PopupWin1');
              el.style.left='';
              el.style.top='';
              el.style.filter='';          if (PopupWin1tmrHide!=-1) clearInterval(PopupWin1tmrHide); PopupWin1tmrHide=-1;          document.getElementById('PopupWin1_header').style.display='none';
              document.getElementById('PopupWin1_content').style.display='none';          if (navigator.userAgent.indexOf('Opera')!=-1)
                el.style.bottom=(document.body.scrollHeight*1-document.body.scrollTop*1
                                -document.body.offsetHeight*1+1*PopupWin1popupBottom)+'px';
              
              if (PopupWin1bChangeTexts)
              {
                PopupWin1bChangeTexts=false;
                document.getElementById('PopupWin1aCnt').innerHTML=PopupWin1nMsg;
                document.getElementById('PopupWin1titleEl').innerHTML=PopupWin1nTitle;
              }          PopupWin1actualHgt=0; el.style.height=PopupWin1actualHgt+'px';
              el.style.visibility='';
              if (!PopupWin1resetTimer) el.style.display='';
              PopupWin1tmrId=setInterval(PopupWin1espopup_tmrTimer,(PopupWin1resetTimer?1000:20));
      

  6.   

    接着:        }        function PopupWin1espopup_winLoad()
            {
              if (PopupWin1oldonloadHndlr!=null) PopupWin1oldonloadHndlr();          elCnt=document.getElementById('PopupWin1_content')
              elTit=document.getElementById('PopupWin1_header');
              el=document.getElementById('PopupWin1');
              PopupWin1popupBottom=el.style.bottom.substr(0,el.style.bottom.length-2);
              
              PopupWin1titHgt=elTit.style.height.substr(0,elTit.style.height.length-2);
              PopupWin1popupHgt=el.style.height;
              PopupWin1popupHgt=PopupWin1popupHgt.substr(0,PopupWin1popupHgt.length-2); PopupWin1actualHgt=0;
              PopupWin1cntDelta=PopupWin1popupHgt-(elCnt.style.height.substr(0,elCnt.style.height.length-2));          if (true)
              {
                PopupWin1resetTimer=true;
                PopupWin1espopup_ShowPopup(null);
              }
            }        function PopupWin1espopup_tmrTimer()
            {
              el=document.getElementById('PopupWin1');
              if (PopupWin1resetTimer)
              {
                el.style.display='';
                clearInterval(PopupWin1tmrId); PopupWin1resetTimer=false;
                PopupWin1tmrId=setInterval(PopupWin1espopup_tmrTimer,20);
              }
              PopupWin1actualHgt+=5;
              if (PopupWin1actualHgt>=PopupWin1popupHgt)
              {
                PopupWin1actualHgt=PopupWin1popupHgt; clearInterval(PopupWin1tmrId); PopupWin1tmrId=-1;
                document.getElementById('PopupWin1_content').style.display='';
                if (PopupWin1hideAfter!=-1) PopupWin1tmrHide=setInterval(PopupWin1espopup_tmrHideTimer,PopupWin1hideAfter);
              }
              if (PopupWin1titHgt<PopupWin1actualHgt-6)
                document.getElementById('PopupWin1_header').style.display='';
              if ((PopupWin1actualHgt-PopupWin1cntDelta)>0)
              {
                elCnt=document.getElementById('PopupWin1_content')
                elCnt.style.display='';
                elCnt.style.height=(PopupWin1actualHgt-PopupWin1cntDelta)+'px';
              }
              el.style.height=PopupWin1actualHgt+'px';
            }
            
            function PopupWin1espopup_tmrHideTimer()
            {
              clearInterval(PopupWin1tmrHide); PopupWin1tmrHide=-1;
              el=document.getElementById('PopupWin1');
              if (PopupWin1hasFilters)
              {
                backCnt=document.getElementById('PopupWin1_content').innerHTML;
                backTit=document.getElementById('PopupWin1_header').innerHTML;
                document.getElementById('PopupWin1_content').innerHTML='';
                document.getElementById('PopupWin1_header').innerHTML='';
                el.style.filter='blendTrans(duration=1)';
                el.filters.blendTrans.apply();
                el.style.visibility='hidden';
                el.filters.blendTrans.play();
                document.getElementById('PopupWin1_content').innerHTML=backCnt;
                document.getElementById('PopupWin1_header').innerHTML=backTit;
                
                PopupWin1dxTimer=setInterval(PopupWin1espopup_dxTimer,1000);
              }
              else el.style.visibility='hidden';
            }
            
            function PopupWin1espopup_dxTimer()
            {
              clearInterval(PopupWin1dxTimer); PopupWin1dxTimer=-1;
            }
         
            function PopupWin1espopup_Close()
            {
              if (PopupWin1tmrId==-1)
              {
                el=document.getElementById('PopupWin1');
                el.style.filter='';
                el.style.display='none';
                if (PopupWin1tmrHide!=-1) clearInterval(PopupWin1tmrHide); PopupWin1tmrHide=-1;
                
              }
            }
        
            function PopupWin1espopup_ShowWindow()
            {
              
              if (PopupWin1nWin!=null) PopupWin1nWin.close();
              PopupWin1nWin=window.open('','PopupWin1nWin','width=400,height=250,scrollbars=yes, '+
                'menubar=no, resizable=no, status=no, toolbar=no, location=no');
              PopupWin1nWin.document.write(PopupWin1nText);
            }        var PopupWin1mousemoveBack,PopupWin1mouseupBack;
            var PopupWin1ofsX,PopupWin1ofsY;
            function PopupWin1espopup_DragDrop(e)
            {
              PopupWin1mousemoveBack=document.body.onmousemove;
              PopupWin1mouseupBack=document.body.onmouseup;
              ox=(e.offsetX==null)?e.layerX:e.offsetX;
              oy=(e.offsetY==null)?e.layerY:e.offsetY;
              PopupWin1ofsX=ox; PopupWin1ofsY=oy;          document.body.onmousemove=PopupWin1espopup_DragDropMove;
              document.body.onmouseup=PopupWin1espopup_DragDropStop;
              if (PopupWin1tmrHide!=-1) clearInterval(PopupWin1tmrHide);
            }        function PopupWin1espopup_DragDropMove(e)
            {
              el=document.getElementById('PopupWin1');          
              if (e==null&&event!=null)
              {
                el.style.left=(event.clientX*1+document.body.scrollLeft-PopupWin1ofsX)+'px';
                el.style.top=(event.clientY*1+document.body.scrollTop-PopupWin1ofsY)+'px';
                event.cancelBubble=true;
              }
              else
              {
                el.style.left=(e.pageX*1-PopupWin1ofsX)+'px';
                el.style.top=(e.pageY*1-PopupWin1ofsY)+'px';
                e.cancelBubble=true;
              }
              if ((event.button&1)==0) PopupWin1espopup_DragDropStop();
            }        function PopupWin1espopup_DragDropStop()
            {
              document.body.onmousemove=PopupWin1mousemoveBack;
              document.body.onmouseup=PopupWin1mouseupBack;
            }      //]]>
          </script><div id="PopupWin1" style="display:none; background:#E0E9F8; border-right:1px solid #455690; border-bottom:1px solid #455690;
                      border-left:1px solid #B9C9EF; border-top:1px solid #B9C9EF; position:absolute;
                      z-index:9999;  width:272px; height:149px; right:15px; bottom:15px;" onselectstart="return false;" ><div id="PopupWin1_header" style="cursor:default; display:none; position:absolute; left:2px; width:266px; top:2px; height:14px;
                     filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
                     StartColorStr='#FFE0E9F8', EndColorStr='#FFFFFFFF');font:12px arial,sans-serif; color:#1F336B; text-decoration:none;"><span id="PopupWin1titleEl">欢迎进入广东省彩票管理系统!</span><span style="position:absolute; right:0px; top:0px; cursor:pointer; color:#728EB8; font:bold 12px arial,sans-serif; 
                      position:absolute; right:3px;"
                      onclick="PopupWin1espopup_Close()"
                      onmousedown="event.cancelBubble=true;"
                      onmouseover="style.color='#455690';"
                      onmouseout="style.color='#728EB8';">X</span></div><div id="PopupWin1_content" onmousedown="event.cancelBubble=true;" style="display:none; border-left:1px solid #728EB8; border-top:1px solid #728EB8;
                     border-bottom:1px solid #B9C9EF; border-right:1px solid #B9C9EF;
                     background:#E0E9F8; padding:2px; overflow:hidden; text-align:center;
                     filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
                     StartColorStr='#FFE0E9F8', EndColorStr='#FFFFFFFF');position:absolute; left:2px; width:266px; top:20px; height:125px;"><a style="font:12px arial,sans-serif; color:#1F336B; text-decoration:none;" onmouseover="style.textDecoration='underline';"
                      onmouseout="style.textDecoration='none';"
                      href="javascript:PopupWin1espopup_ShowWindow();" id="PopupWin1aCnt"><br><br><div aglin=center>欢迎进入广东省彩票管理系统1.0V<br>当前系统没有公告!</div></a></div></div>
    </div>
      

  7.   

    太长,所有我分开两贴了,效果挺好的,是外国一个.net控件,然后我该成asp邦,如果你需要。net伴的话,我可以给你寄,有原代码
      

  8.   

    to:高处不胜寒:
    如果您愿意可以把.net代码寄给我,非常感谢。
      

  9.   

    用控间的效果最好,用简单的div实现效果都不好,最致命的是经常被屏蔽
      

  10.   

    to:高处不胜寒:
    也给我发份.net版的代码,非常感谢