标签:
css:
#loading {
width:170px;
height:25px;
border:3px solid #C3DAF9;
position:absolute;
top:300px;
left:600px;
z-index:10000;
background-color:#F7F9FC;
line-height:25px;
vertical-align:middle;
font-size:11pt;
display:none;
}
html:
<div id="loading"><img src="${path}/map/image/2012032811155512.gif" />正在加载数据,请稍候...</div>
js:
$.ajax({
async: true,
beforeSend: function () {
ShowDiv();
},
complete: function () {
HiddenDiv();
},
type : ‘POST‘ ,
url : ‘‘,
data : {
},
success: function (data) {
//var obj = JSON.parse(data);
//var str = JSON.stringify(obj);
}
});
//显示加载数据
function ShowDiv() {
$("#loading").show();
}
//隐藏加载数据
function HiddenDiv() {
$("#loading").hide();
}
图片:
标签:
原文地址:http://www.cnblogs.com/zengdingxin/p/5725061.html