您现在的位置:首页 >> 前端 >> 内容

根据后台循环的数据动态弹出提示框,并且实现带有遮蔽层

时间:2017/6/23 9:33:00 点击:

  核心提示:通过ajax动态获得数据,然后根据所得数据,进行相应的带有遮蔽层的DIV提示框。并且实现点击关闭按钮,即可关闭提示框。.bgDiv{background-color:#e3e3e3; position...

通过ajax动态获得数据,然后根据所得数据,进行相应的带有遮蔽层的DIV提示框。并且实现点击关闭按钮,即可关闭提示框。


    <script type="text/javascript">
    $(function(){
          var prompts = document.getElementsByName("prompt");
          var heights=$(document.body).height()/30;
          var widths = $(document.body).width()/4;
          var bgHeights = getScrollHeight();
          $("#bgDiv").css({ display: "block", height: bgHeights});
          //循环弹出p层
          for(var i=0;ijspRefresh(){
             window.location.reload();
        }
         return false;
       }
    </script>

jsp实现代码:


 

  • 提示信息:${mrm.alarmEvent}
  •  
  • 时间:
  •  

作者:网络 来源:qq_2736172