就是一个层吗 ?不用window.open

解决方案 »

  1.   

    看不到图下面是在浏览器右下角弹出提示,延时隐藏var oPopup = window.createPopup(); 
    var popTop=50; 
    function popmsg(qr_whdanmsg,whdanmsg,mimamsg){ 
    var winstr=" <table style=\"border: 1 solid  #FFA6CA\"  width=\"241\" height=\"172\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; 
      winstr+=" <tr>"; 
      winstr+=" <td height=\"25\">&nbsp; </td>"; 
      winstr+=" </tr>"; 
      winstr+=" <tr>"; 
        winstr+=" <td height=\"25\" align=\"center\" valign=\"top\" style=\"font-size:12px; color: red; face: Tahoma ;\" >"+whdanmsg+" </td>"; 
      winstr+=" </tr>"; 
       
       winstr+=" <tr>"; 
        winstr+=" <td height=\"25\" align=\"center\" valign=\"top\" style=\"font-size:12px; color: red; face: Tahoma ;\" >"+qr_whdanmsg+" </td>"; 
      winstr+=" </tr>"; 
       
      winstr+=" <tr>"; 
        winstr+=" <td height=\"25\" align=\"center\" valign=\"top\" style=\"font-size:12px; color: red; face: Tahoma;\" >"+mimamsg+" </td>"; 
      winstr+=" </tr>"; 
      winstr+=" <tr>"; 
        winstr+=" <td>&nbsp; </td>"; 
      winstr+=" </tr>"; 
    winstr+=" </table>"; 
    oPopup.document.body.innerHTML = winstr; 
    popshow(); 

    function popshow(){ 
    //window.status=popTop; 
    if(popTop>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,180); 

    popTop+=10; 
    var mytime=setTimeout("popshow();",50); 

    popmsg("","","");
      

  2.   

    <SCRIPT language="javascript" > 
            var oPopup = window.createPopup();
            var popTop=50;
            function popmsg(msgstr){
            var winstr="<table bgcolor='#93BEE2' width=\"241\" height=\"100\" border=\"1\" bordercolorlight=\"#C0C0C0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\">";
            winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"100\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
            winstr+="<tr><td valign=\"top\" style=\"font-size:12px;\">"+msgstr+"</td></tr></table></td></tr></table>";
            oPopup.document.body.innerHTML = winstr;
            popshow();
            }
            function popshow(){
            //window.status=popTop;
            if(popTop>1720){
            clearTimeout(mytime);
            oPopup.hide();
            return;
            }else if(popTop>1520&&popTop<1720){
            oPopup.show(screen.width-250,800,241,100);
            //oPopup.show(screen.width-250,screen.height,241,80);
            }else if(popTop>1500&&popTop<1520){
            oPopup.show(screen.width-250,800,241,100);
            //oPopup.show(screen.width-250,screen.height+(popTop-1720),241,80);
            }else if(popTop<180){
            oPopup.show(screen.width-250,800,241,100);
            //oPopup.show(screen.width-250,screen.height,241,80);
            }else if(popTop<220){
            oPopup.show(screen.width-250,800,241,100);
            //oPopup.show(screen.width-250,screen.height-popTop,241,80);
            }
            popTop+=10;
            var mytime=setTimeout("popshow();",60);
            }
            
           
            popmsg("    <br><table border=0 width='100%' bgcolor='#93BEE2'><tr><td align='center' style='font-size:12px'>◆站内提醒◆</td></tr><tr><td style='font-size:12px' align='center'><span style='line-height:150%' >你有新的短信<%=(Session ["newmsgsum"] != null) ? "("+Session ["newmsgsum"].ToString () + ")" : "" %><span></td></tr></table>");
            
       
    </SCRIPT>
      

  3.   

    很容易,绝对定位层。直接定位到屏幕的右下角应该就可以 楼上的几位做的都是兼容IE 的把,ff下面你们不考虑 createPopup()应该是过时的东东啦~~~
      

  4.   

    <SCRIPT LANGUAGE="JScript">
         function FixDivPos(DivId,WUC_id)
        {
        $(DivId,WUC_id).style.top="0px";
        $(DivId,WUC_id).style.left="0px";
        
        }
        
        function $(objId,WUC_id)
        {
          if(WUC_id==null)
          {
            return document.getElementById(objId);
          }
          else
          {
            return document.getElementById(WUC_id+"_"+objId);
          }
          
        }
        //建立一个弹出窗口    var oPopup = window.createPopup();    //得到这个弹出窗口的body
        var oPopupBody = oPopup.document.body;    //开始显示的坐标(默认是最右下脚)
        flyMove.expand = 0;
        flyMove.flyY = 0;
        flyMove.flyX = 0;    //渐进显示的定时器
        var g_idFlyPopup = -1;    //显示弹出窗口的定时器
        var TimeoutFlag=-1;    //显示弹出窗口的方法------------------------------------------------------从这里调用
        function richDialog()
        {
            //在弹出窗口中写入文字和数据        oPopup.document.body.innerHTML = oDialog.innerHTML;      oPopupBody.style.fontSize = document.body.currentStyle.fontSize;
         oPopupBody.style.backgroundImage='url(Resource/default/images/newsbg.gif)';
         oPopupBody.style.cursor="pointer";
         oPopupBody.style.color = "infotext";
         oPopupBody.style.borderWidth='0px';
         oPopupBody.style.borderStyle='window-inset';
         oPopupBody.style.borderColor='activeborder';
         //下面代码会立即显示弹出窗口      // oPopup.show(50, 50, 50, 50);     flyInit();
         g_idFlyPopup = window.setInterval(flyMove,10);
        }    function flyMove()
        {
         flyMove.expand += 2;
         flyMove.flyY -= 2;
         oPopup.show(flyMove.flyX-flyMove.expand, flyMove.flyY, flyMove.expand, flyMove.expand);
         var oPopupBody = oPopup.document.body;
         if (oPopupBody.clientWidth >= oPopupBody.scrollWidth && oPopupBody.clientHeight >= oPopupBody.scrollHeight)
         {
          //清除渐进显示的定时器
          window.clearInterval(g_idFlyPopup);
          g_idFlyPopup = -1;      //清除调用弹出窗口的定时器
          window.clearTimeout(TimeoutFlag);
          TimeoutFlag=-1;      //注册6秒后关闭弹出窗口的定时器
          window.setTimeout( 'closePopup()', 9000);
         }
        }    //关闭弹出窗口
        function closePopup()
        {
         if( null != oPopup )
         {
          oPopup.hide();
         }
        }    //初始化弹出窗口的坐标,将其定位到最右下角    function flyInit()
        {
         flyMove.expand = 0;
         flyMove.flyY = window.screen.height;
         flyMove.flyX = window.screen.width;
        }
        </SCRIPT>
      

  5.   

    5楼、6楼 不是我所要求的,都是在屏幕的右下角显示出层来
    11楼好像没有窗口弹出类似于以下博客,在右下角的窗口
    http://danierblog.blogcn.com/index.shtml
    http://blog.sina.com.cn/LoDreamWay#aList_1