日期:2014-05-16 浏览次数:20298 次
<!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> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script type="text/javascript"> function test(){ divTest.innerHTML ="请稍后..."; setTimeout('hideMethod()',3000); } function hideMethod(){ divTest.style.display="none"; } </script> </head> <body> <form id="form1" method="post"> <input type="button" onclick="test()" value="测试" /> </form> <div id="divTest" style="background-color:red"></div> </body> </html>
------解决方案--------------------
<!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> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style type="text/css"> .mystyle {position:absolute; top:50%; left:50%; text-align:center; margin:-100px 0 0 -100px; width:200px; height:100px; /*这里,height和line-height的值设置成一样,使文字垂直居中显示在DIV当中*/ line-height:100px; background:#000 ; FILTER: progid:DXImageTransform.Microsoft.Gradient(startColorStr='#ffffff', endColorStr='#00009B', gradientType='0'); } </style> <div></div> <script type="text/javascript"> function test(){ document.getElementById("divTest").className="mystyle"; divTest.innerHTML ="请稍后......"; setTimeout('hideMethod()',3000); } function hideMethod(){ divTest.style.display="none"; } </script> </head> <body> <form id="form1" method="post"> <input type="button" onclick="test()" value="测试" /> </form> <div id="divTest"></div> </body> </html>
------解决方案--------------------
代码上传到http://www.dbank.com/download.action?t=40&k=Mzc5NDIzNA==&pcode=LCw0NTEyMiw0NTEyMg==&rnd=9763