鸿运当头C#/Blazor/ASP.NET/WinForm/WebAPI

因为爱上你,我才懂得珍惜,每一天日记,都写满了甜蜜
因为想念你,我每天都可以,对着镜子说我多爱你,有多想见到你。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::


    <script language="javascript" type="text/javascript">
    //<!--
        var h_Body = document.body.clientHeight;
        document.getElementById("details").style.height = h_Body - 72;              
      
        var PopWidth = 260; //信息框宽度
        var PopHeight = 180; //信息框高度
        var PopBorder = 25; //距屏幕边缘的距离
        var PopShow = 10000; //信息框的显示时间
        var PopTop = 0;
        var showtime, hidetime;
        var oPopup = window.createPopup();
        function popmsg(msgstr)
        {
            var winstr="<table  valign=\"top\" style=\"border: 1 solid #6D93C8\" width='" + PopWidth + "' height='"
                             + PopHeight + "' border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >";  
            winstr+="<tr><td bgcolor=\"#BCCCDF\" onClick=\"parent.pophide();\" valign=\"top\" align=\"center\"  height=\"20\" style=\"font-size:14px; color: #6D93C8; face: Tahoma;filter:Blur(add=1,direction=45,strength=8) \">你有新短消息:</td></tr><tr><td valign=\"top\" align=\"center\"><table valign=\"top\" width=\"90%\" height=\"110\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";  
            winstr+="<tr><td valign=\"top\" style=\"font-size:12px; color: #6D93C8; face: Tahoma\">"+msgstr+"</td></tr></table></td></tr></table></div>";  
             
            oPopup.document.body.innerHTML = winstr;  
            popshow();
            oPopup.document.body.onclick = pophide; //单击信息框时开始隐藏
            //setInterval('window.focus()',0); //让IE重获取焦点 
            //setInterval('window.focus()',0); //让IE重获取焦点
         }    
       //信息框显示程序
        function popshow() {
            //当不足以显示信息框全部时,缩小信息框高度
            var tmpHeight = PopTop < PopHeight ? PopTop : PopHeight;

            //信息框定位,screen.width:屏幕宽度、screen.height:屏幕高度
            oPopup.show(screen.width - (PopWidth + PopBorder), screen.height - PopTop, PopWidth, tmpHeight);
           
            if (PopTop < (PopHeight + PopBorder)) {
                PopTop = PopTop + 10; //信息框位置递增
            }
            else {
                setTimeout("pophide();", PopShow); //准备隐藏信息框  一直显示
            }
            showtime = setTimeout("popshow();", 100);
        }
        //信息框隐藏程序
        function pophide() {
            if (showtime) {
                clearTimeout(showtime); //清除显示时间句柄
            }
            var tmpHeight = PopTop < PopHeight ? PopTop : PopHeight;
            oPopup.show(screen.width - (PopWidth + PopBorder), screen.height - PopTop, PopWidth, tmpHeight);
            if (PopTop > 0) {
                PopTop = PopTop - 10;
                hidetime = setTimeout("pophide();", 100);
            }
            else {
                clearTimeout(hidetime);
                oPopup.hide();          //完全隐藏信息框
            }
        }
        /*提示间隔时间*/ 
        var secs=10;//第一次提示时间秒  
        function checkServer(secs)
        {  
            for(i=1;i<=secs;i++)
            {  
              window.setTimeout("update(" + i + ")", i * 1000);  
            }  
        }  
        function update(num) {  
           if(num == secs)
           {
             var isRemind=document.getElementById("isRemind").checked;
             var RemindTime = document.getElementById('ddlRemindTime').value;
             if(isRemind)
             {                
                 var out=Main.GetMSG("<%=this.UserId %>").value
                 if(out.length>0)
                 {
                    popmsg("<BR>"+out);
                 }
                 secs=1*RemindTime;//提示时间秒  
                 for(i=1;i<=secs;i++)
                 {  
                    window.setTimeout("update(" + i + ")", i * 1000);  
                 }
             }
             else
             {
                 secs=1*RemindTime;//提示时间秒  
                 for(i=1;i<=secs;i++)
                 {  
                    window.setTimeout("update(" + i + ")", i * 1000);  
                 }
             }
           }  
           else
           {  
              printnr = secs-num;
           }  
        }  
        checkServer(secs);
    // -->
    </script>

posted on 2009-03-15 13:36  月异星邪  阅读(716)  评论(0编辑  收藏  举报