---
title: "提示用户系统正忙_web方式"
author: "BBjava"
date: "2011-09-14T10:10:44Z"
tags: []
categories: ["Web前端"]
slug: "web"
draft: false
lastmod: "2011-09-14T10:10:44Z"
id: 1171423
url: "https://bbjava.iteye.com/blog/1171423"
---

页面上要有下面这段html代码：


```html

<div id="BusyMsg" align="center" style="z-index:101;left:25%;top:45%;width:50%;height:100; position:absolute; display:none;background:#F7F7F7; background-color: #F7F7F7; border: 1px solid #4284F7;">
	<table height="100%" align="center">
		<tr>
			<td><img src="<%=ctx%>/images/loading.gif" width="16" height="16"/></td>
			<td><label id='MsgText'></label></td>
		</tr>
	</table>
</div>

<div id="BusyDiv" style="position:absolute; top:0; left:0; width:100%; height:100%; z-index:100; display:none;">
	<table style="width:100%;height:100%;background-color: transparent; ">
		<tr><td></td></tr>
	</table>
</div>

```


加上这些javascript代码：
```js
function onLoading(){

	window.document.all.MsgText.innerHTML = "正在查询数据，请稍候……";
	window.document.all.BusyMsg.style.display = "";
	window.document.all.BusyDiv.style.display = "";
}

function afterLoading(){
	
	window.document.all.MsgText.innerHTML = "";
	window.document.all.BusyMsg.style.display = "none";
	window.document.all.BusyDiv.style.display = "none";
}
```


这段代码多用于异步请求大数据量查询的情况。