问题是函数执行时,层并没有显示,而是到了最后层才显示了一下并接着隐藏了

解决方案 »

  1.   

    <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><title></title>
    </head>
    <body>
    <script>
    function onclike()
    {
    document.getElementById("doing").style.visibility="visible";
    alert();
    document.getElementById("doing").style.visibility="hidden";
    }
    </script>
    <div id="doing" style="Z-INDEX: 101; LEFT: 0px; WIDTH: 100%; CURSOR: wait; POSITION: absolute; TOP: 0px; HEIGHT: 100%; visibility:hidden;">
    <td style="font-size:13px">正在运行,请稍候......<br>
    </div>
    <input value="click" type="button" onclick="onclike();"/>
    </body>
    </html>你的这个visibility:'visible'有点问题