This page demonstrates several ways to block the page. Each button below activates blockUI and then makes a remote call to the server.

The following code is used on this page:

<script type="text/javascript"> 

    // unblock when ajax activity stops
$(document).ajaxStop($.unblockUI); function test() {
$.ajax({ url: 'wait.php', cache: false });
} $(document).ready(function() {
$('#pageDemo1').click(function() {
$.blockUI();
test();
});
$('#pageDemo2').click(function() {
$.blockUI({ message: '<h1><img src="busy.gif" /> Just a moment...</h1>' });
test();
});
$('#pageDemo3').click(function() {
$.blockUI({ css: { backgroundColor: '#f00', color: '#fff' } });
test();
}); $('#pageDemo4').click(function() {
$.blockUI({ message: $('#domMessage') });
test();
});
}); </script> ... <div id="domMessage" style="display:none;">
<h1>We are processing your request. Please be patient.</h1>
</div>

参考:http://malsup.com/jquery/block/#overview

最新文章

  1. 使用axis开发web service服务端
  2. windows下安装MongoDB要注意的问题
  3. Educational Codeforces Round 15 [111110]
  4. JavaScript基础13——js的string对象
  5. 夺命雷公狗---DEDECMS----6快速入门之总结篇
  6. UILabel的抗压缩、抗拉伸、以及控件的约束简述
  7. YARN学习笔记(一)——YARN的简介
  8. global文件中的application_start方法中做: 定时器
  9. java中数组、list、泛型集合的长度
  10. c#项目减少源代码大小
  11. Windows环境使用Nexus-3.x搭建Maven私服
  12. PHP学习-类
  13. (原)Echarts 报Uncaught Error: Initialize failed: invalid dom 根本解决
  14. 二叉堆复习(包括d堆)
  15. Jquery获取选中的文本值
  16. Python字符串与二进制串的相互转换
  17. SWIFT中数字格式
  18. Linux nc命令用法收集
  19. 使用C语言实现线性表
  20. VIO系统的IMU与相机时间偏差标定

热门文章

  1. Django连接MySQL数据库配置
  2. Java中CAS-ABA的问题解决方案
  3. ZOJ-3774 Power of Fibonacci——等比数列求和&amp;&amp;等价替换
  4. Python3连接MySQL数据库实战
  5. shell 编程整合
  6. 学到了林海峰,武沛齐讲的Day24-完 对象和实例
  7. Elasticsearch 调优之 写入速度优化到极限
  8. MySQL 事务 MVCC 版本链
  9. luogu P2345 奶牛集会
  10. getchar 和EOF