站内搜索: 请输入搜索关键词

当前页面: 开发资料首页JSP 专题谁有遮盖层的js代码

谁有遮盖层的js代码

摘要: 谁有遮盖层的js代码


就是例如你提交一个东西,提交等待的时候,遮盖层就会把你的页面盖住,用户就不能修改页面内容了。


用div啊,绝对位置就可以了


这个有点类似的功能
希望能抛砖引玉

/**************************by ****************************/
|需要完善
|
|
|
|
|
|
|
|
/********************************************************************/
function waiting_init()
{
document.write("
"style=/"display:none;background-color:#FF0000; POSITION: absolute;"+
"left:200px; top:120px; width:403px; height:224px;Z-INDEX:9999/"><iframe frameborder=0 height=224px width=403px></iframe>"+
"
"+
"<table width=/"403/" height=/"224/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/" background=/"images/waiting_bg.gif/">"+
"<tr>"+
"<td valign=/"bottom/">"+
"

&nbsp;

"+
"


"+
"
"+
"
"+
"
"+
"
"+
"

"+
"<table width=/"100%/" border=/"0/" align=/"right/" cellpadding=/"0/" cellspacing=/"0/">"+
"<tr> "+
" <td colspan=/"2/" height=/"16/">&nbsp;</td>"+
"</tr>"+
"<tr> <td width=/"1/"></td>"+
" <td width=/"397/" height=/"24/" valign=/"top/" ></td>"+
"</tr>"+
"</table>"+
"</td>"+
"</tr>"+
"</table>
"+
"
");
}

waiting_init();

function waiting()
{
eval("div_waiting").style.top = 120+document.body.scrollTop;
eval("div_waiting").style.display="";
}


function waiting_stop()
{
eval("div_waiting").style.display="none";
}



-------------------------------------------------
自己用的时候需要替换掉js中的img

使用例
function save{
waiting();
form1.submit();}


去网上下载 prototype windows class 然后这样调用
<script type="text/javascript" src="/displaypage/zhegai/javascripts/prototype.js"> </script>
<script type="text/javascript" src="/displaypage/zhegai/javascripts/effects.js"> </script>
<script type="text/javascript" src="/displaypage/zhegai/javascripts/window.js"> </script>
<script type="text/javascript" src="/displaypage/zhegai/javascripts/debug.js"> </script>

<link> href="/displaypage/zhegai/themes/default.css" rel="stylesheet" type="text/css" >
<link> href="/displaypage/zhegai/themes/spread.css" rel="stylesheet" type="text/css" >
<link> href="/displaypage/zhegai/themes/alert.css" rel="stylesheet" type="text/css" >
<link> href="/displaypage/zhegai/themes/alert_lite.css" rel="stylesheet" type="text/css" >
<link> href="/displaypage/zhegai/themes/alphacube.css" rel="stylesheet" type="text/css" >
<link> href="/displaypage/zhegai/themes/debug.css" rel="stylesheet" type="text/css" >

<br/>var timeout;<br/>function openInfoDialog() {<br/> Dialog.info(&#34;数据存储中...&#34;,<br/> {windowParameters: {width:250, height:100}, showProgress: true});<br/> timeout=10000;<br/> setTimeout(infoTimeout, 1000)<br/>}<br/><br/>function infoTimeout() {<br/> timeout--;<br/> if (timeout >0) {<br/> Dialog.setInfoMessage(&#34;请耐心等待...&#34;)<br/> setTimeout(infoTimeout, 1000)<br/> }<br/> else<br/> Dialog.closeInfo()<br/>}<br/>openInfoDialog();<br/>



↑返回目录
前一篇: 在IE中如何自定义打印纸张大小
后一篇: 如果是div绝对居中