作者:十字心死_823 | 来源:互联网 | 2023-09-01 18:41
篇首语:本文由编程笔记#小编为大家整理,主要介绍了页面卸载时显示预加载程序消息相关的知识,希望对你有一定的参考价值。Thisworkscrossbrowser.
篇首语:本文由编程笔记#小编为大家整理,主要介绍了页面卸载时显示预加载程序消息相关的知识,希望对你有一定的参考价值。
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">
$&#40;document&#41;.ajaxStop&#40;$.unblockUI&#41;;
$&#40;document&#41;.ready&#40;function &#40;&#41; &#123;
$&#40;'#lnkBtnPrevious'&#41;.click&#40;function &#40;&#41; &#123;
$.blockUI&#40;&#41;;
&#125;&#41;;
$&#40;'#lnkBtnContinue'&#41;.click&#40;function &#40;&#41; &#123;
if &#40;typeof &#40;Page_ClientValidate&#41; == 'function'&#41; &#123;
Page_ClientValidate&#40;&#41;;
&#125;
if &#40;Page_IsValid&#41; &#123;
$.blockUI&#40;&#41;;
&#125;
&#125;&#41;;
&#125;&#41;;
script>