有的时候google或者其他广告显示不出来,造成页面访问速度奇慢,怎么样解决这个问题呢?我们可以借用AJAX的方式来做一下:
在原位置放置以下代码:〈divid=“GoogleAD“〉〈/div〉
在html最后(〈/body〉前)加上:
〈divid=“tempGoogleAD“style=“display:none;“〉
〈scripttype=“text/javascript“src=“_“〉〈/script〉
〈/div〉
〈scripttype=“text/javascript“〉〈!--
lementById(“GoogleAD“)rHTML=lementById(“tempGoogleAD“)rHTML;
lementById(“tempGoogleAD“)rHTML=““;
//--〉
〈/script〉
这样就会在页面Loading到最后的时候才去连接Adsense的服务器,就不会影响网页打开的速度了。