<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no"/>
<meta name="description" content="">
<meta name="keywords" content="">
<title>html页面异步加载时,显示预加载</title>
</head>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no"/>
<meta name="description" content="">
<meta name="keywords" content="">
<title>html页面异步加载时,显示预加载</title>
</head>
<body class="bge">
<!-- loading -->
<div id="loading_span" class="loading" style="display: none;"><img src="/images/im/loading.gif"></div>
<script type="text/javascript" src="/js/jquery-1.10.1.min.js" ></script>
<script>
//异步加载loading
$(document).ajaxStart(function(){
$('#loading_span').show()
}).ajaxStop(function(){
$('#loading_span').hide()
});
</script>
</body>
</html>