Dynamically add the prompt "loading picture" when uploading or downloading

From , 5 Years ago, written in JavaScript, viewed 78 times.
URL https://pastebin.vip/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.         }

Reply to "Dynamically add the prompt "loading picture" when uploading or downloading"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website