图片预加载
function aftLoadImg(obj,url){ //图片地址切换
var oImg = new Image();
oImg.src = url;
if(oImg.complete){//图片加载完毕并且显示
obj.src = oImg.src;
}else{
oImg.onload = function() {
obj.src = oImg.src;
};
}