zoukankan      html  css  js  c++  java
  • js技巧

    弹出div,显示提示

    function reloadcache(){
       showWaiting(
    "");
    }    
    function showWaiting(msg){
        
    if(msg==null||msg=="") {
            msg 
    = "<font style='font-size:16px'>系统处理中,请稍候</font>";
        }
        
    var obj=document.getElementById("waiting");
        
    if(!obj){
            
    var oBody = document.body;
            oBody.insertAdjacentHTML(
    "beforeEnd""<div id='waiting'></div>");
            obj
    =document.getElementById("waiting");
        }

        
    var str="";
        str
    ="<div id=transparent oncontextmenu='return false' onselectstart='return false' "
        
    + "style=\"position:absolute; 100%;height:100%; top:expression(this.offsetParent.scrollTop); z-index:1; padding:10px; background:#ffffff;filter:alpha(opacity=50); text-align:center;\"> </div>"
        
    + "<div style=\"position:absolute;280px;height:65px; z-index:2;left:expression((document.body.clientWidth-200)/2);top:expression(this.offsetParent.scrollTop + 130); border:1px solid #666666; padding:20px 20px 20px 40px; background:#E4E4E4; \"> "
        + "&nbsp;"
        
    + msg + "</div>";
        obj.innerHTML
    =str;
        setTimeout(
    "stopWaiting()","5000");//提示显示多长时间 
    }

    function stopWaiting(){
        document.getElementById(
    "waiting").innerHTML="";
    }
  • 相关阅读:
    JavaScript学习(五)
    浏览器输入地址到返回页面
    session cookie
    springboot 运行jar包
    mysql:The user specified as a definer ('root'@'%') does not exist
    easyUI
    json
    json fastjson
    springboot:because it is a JDK dynamic proxy that implements:
    git 提示错误:(non-fast-forward)
  • 原文地址:https://www.cnblogs.com/zping/p/1520457.html
Copyright © 2011-2022 走看看