关于缓冲提示框
tool.js
var myAlert = {
show : function(){
var windowWidth = window.innerWidth;
windowHeight = window.innerHeight;
alertContainer = document.createElement("div");
alertContainer.id = "myAlertBox";
alertContainer.style.cssText="position:absolute;left:0px;top:0px;width:100%;z-index:9999;";
alertContainer.style.height = windowHeight+"px";
alertOpacity = document.createElement("div");
alertOpacity.style.cssText="position:absolute;left:0px;top:0px;width:100%;background:#000;opacity:0.5;z-index:9999;";
alertOpacity.style.height = windowHeight+"px";
alertContainer.appendChild(alertOpacity)
alertMainBox = document.createElement("div");
alertMainBox.style.cssText="position:absolute;width:40px;height:40px;line-height:40px;text-align:center;z-index:10000;"
alertMainBoxLeft = (windowWidth-40)/2;
alertMainBoxTop = (windowHeight-40)/3;
alertMainBox.style.left = alertMainBoxLeft+"px";
alertMainBox.style.top = alertMainBoxTop+"px";
alertMainBox.innerHTML = "<img style='width:100%;height:100%' src='../template/images/loading.gif'/>";
alertContainer.appendChild(alertMainBox);
document.body.appendChild(alertContainer);
},
close: function(){
document.body.removeChild(document.getElementById("myAlertBox"));
}
}