[JavaScript] 上传或下载等待时动态添加提示“正在加载图片” →→→→→进入此内容的聊天室

来自 , 2019-03-09, 写在 JavaScript, 查看 152 次.
URL http://www.code666.cn/view/0d808085
  1.  function showImg() {
  2.      
  3.             var newMask = document.createElement("div"); //加载一个蒙层,防止点击
  4.             newMask.style.position = "absolute";
  5.             newMask.style.zIndex = "1";
  6.             newMask.style.width = document.body.scrollWidth + "px"; //适应文档宽度
  7.             newMask.style.height = document.body.clientHeight+"px";//适应文档高度
  8.             newMask.style.top = "0px";
  9.             newMask.style.left = "0px";
  10.             newMask.style.backgroundColor = "#fff";//背景色
  11.             newMask.style.filter = "alpha(opacity=40)";
  12.             newMask.style.opacity = "0.40";//透明度
  13.             newMask.style.display = "block";
  14.             newMask.style.textAlign = "center";
  15.             newMask.style.paddingTop = document.body.clientHeight / 2 + "px";
  16.             document .append(newMask);
  17.             $("body").append("<img  src='../images/jiazai2.gif'/>");
  18.             var imgd = document.getElementsByTagName("img")[0];
  19.             imgd.style.position = "absolute";//图片定位
  20.             imgd.style.zIndex = "9999";
  21.             imgd.style.top = document.body.clientHeight / 2+ "px";
  22.             imgd.style.left = document.body.scrollWidth/2-50 + "px";
  23.         }

回复 "上传或下载等待时动态添加提示“正在加载图片”"

这儿你可以回复上面这条便签

captcha