//获取弹框

<script>

function tips_pop(){
            var MsgPop=document.getElementById("winpop");
            var popH=parseInt(MsgPop.style.height);
            if (popH==0){   
                MsgPop.style.display="block";
                show=setInterval("changeH('up')",2);
            }
            else {
            hide=setInterval("changeH('down')",2);
            }
        }
        function changeH(str) {
            var MsgPop=document.getElementById("winpop");
            var popH=parseInt(MsgPop.style.height);
            if(str=="up"){
                if (popH<=100){
                    MsgPop.style.height=(popH+4).toString()+"px";
                }
                else{
                    clearInterval(show);
                }
            }
            if(str=="down"){
                if (popH>=4){
                    MsgPop.style.height=(popH-4).toString()+"px";
                }
                else{
                    clearInterval(hide);
                    MsgPop.style.display="none";
                }
            }
        }
        window.onload=function(){
            document.getElementById('winpop').style.height='0px';
            setTimeout("tips_pop()",800);
        }

</script>

//div内容和刷新新消息

<div >

</div>

//获取消息提醒状态值
function winpop(){
  var state = '0';
  $.get("${ctx}/sys/msgUser/getMsgUserType?state="+state+"&t="+new Date().getTime(), function(data){
    $("#notifications").html(data);
  });   
}
winpop();
//定时刷新获取最新未读消息
setInterval(function(){
  $("#winpop").load(winpop(),"");
}, 10000);

 

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案