页面卸载时显示预加载程序消息
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了页面卸载时显示预加载程序消息相关的知识,希望对你有一定的参考价值。
This works cross browser. Merely using onclick on a submit button to show a preloader/ please wait dialog doesn't work in IE since it doesn't show images once the page is being unloaded.
<script type="text/javascript" src="https://github.com/malsup/blockui/raw/master/jquery.blockUI.js"></script> <script type="text/javascript"> $(document).ajaxStop($.unblockUI); $(document).ready(function () { $('#lnkBtnPrevious').click(function () { $.blockUI(); }); $('#lnkBtnContinue').click(function () { if (typeof (Page_ClientValidate) == 'function') { Page_ClientValidate(); } if (Page_IsValid) { $.blockUI(); } }); }); </script>
以上是关于页面卸载时显示预加载程序消息的主要内容,如果未能解决你的问题,请参考以下文章