首页 > 代码库 > Ajax风格的一款网页Loading效果

Ajax风格的一款网页Loading效果

现在比较流行的一款Ajax风格的网页Loading,多见于一些大量使用Ajax技术的网站中,页面加载时会自动显示提示信息,带载入动画效果,网页加载完自动消失,是一款正在具有Loading功能的网页进度条。

<html></P>
<P><head>
<title>Loading</title>
<style type="text/css">
body{background-color:#000;}
#content{display:none;}
#loadbox{position:absolute;top:50%;left:50%;margin-left:-68px;margin-top:-36px;width:222px;height:58px;text-align:center;}
#loadbox span{display:block;width:222px;height:32px;text-align:center;color:#CCC;font-size:9pt;}
</style>
<script type="text/javascript">
document.write(<div id="loadbox"><span>页面加载中,请稍候……</span><img src="http://www.mamicode.com/jscss/demoimg/200907/loading.gif" border="0"></div>);
window.onload = function(){   
document.getElementById(loadbox).style.display="none";
document.getElementById(content).style.display="block";
} 
</script>
</head>
<body>
<div id="content"><iframe src="#" width="800" height="360" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe></div>
</body>
</html> 

 

<iframe id="google_ads_frame2" vspace="0" height="250" marginHeight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3447371224873639&output=html&h=250&slotname=8660799060&adk=1970350646&w=300&lmt=1398864225&flash=11.9.900.117&url=http%3A%2F%2Fwww.cnblogs.com%2Franran%2Fp%2F3701175.html&dt=1398864202997&shv=r20140424&cbv=r20140417&saldr=sb&prev_slotnames=4356862740&correlator=1398864202917&frm=20&ga_vid=429972749.1397695120&ga_sid=1398816550&ga_hid=1441926386&ga_fc=1&u_tz=480&u_his=766&u_java=1&u_h=768&u_w=1364&u_ah=740&u_aw=1364&u_cd=16&u_nplug=0&u_nmime=0&dff=verdana&dfs=13&adx=0&ady=1134&biw=314&bih=74&eid=317150304&oid=3&rx=0&eae=0&docm=9&vis=0&fu=0&ifi=2&xpc=FcZvQWVbop&p=http%3A//www.cnblogs.com&dtd=47" frameBorder="0" width="300" allowTransparency="true" name="google_ads_frame2" marginWidth="0" scrolling="no" hspace="0"></iframe><iframe id="google_ads_frame3" vspace="0" height="250" marginHeight="0" src="http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3447371224873639&output=html&h=250&slotname=8660799060&adk=1970350646&w=300&lmt=1398864225&flash=11.9.900.117&url=http%3A%2F%2Fwww.cnblogs.com%2Franran%2Fp%2F3701175.html&dt=1398864203052&shv=r20140424&cbv=r20140417&saldr=sb&prev_slotnames=4356862740%2C8660799060&correlator=1398864202917&frm=20&ga_vid=429972749.1397695120&ga_sid=1398816550&ga_hid=1441926386&ga_fc=1&u_tz=480&u_his=766&u_java=1&u_h=768&u_w=1364&u_ah=740&u_aw=1364&u_cd=16&u_nplug=0&u_nmime=0&dff=verdana&dfs=13&adx=305&ady=1384&biw=314&bih=74&eid=317150304&oid=3&rx=0&eae=0&docm=9&vis=0&fu=0&ifi=3&xpc=KYYWM9zoxJ&p=http%3A//www.cnblogs.com&dtd=45" frameBorder="0" width="300" allowTransparency="true" name="google_ads_frame3" marginWidth="0" scrolling="no" hspace="0"></iframe>