点击下载3秒后关闭<script language='javascript'>
function down() {
setTimeout('window.close()', 3000);
}
</script>
<a href="地址" onclick="down()" target="_blank">下载</a>
function down() {
setTimeout('window.close()', 3000);
}
</script>
<a href="地址" onclick="down()" target="_blank">下载</a>
var ison=document.frames("outparam").getC('Dialog_View');
if(ison!='no'){
var links=document.links;
for ( i = 0; i < links.length ; i ++ ){
var thisurl=links[i].href.substring(links[i].href.length-1);
if(links[i].target=='' && thisurl!='#'){
links[i].attachEvent('onclick',aclick);
}
}
}
}
function aclick(){
window.showModelessDialog('/admin/common/等待页面.htm','barwin','dialogWidth=315px;dialogheight=100px;help=no;center=yes;status=no;scroll=no');
return true;
}
window.onload=out;
为页面上所有链接增加等待事件当点击一个链接时,会跳出一个窗口;当打开完成时,自己动关闭这个跳出的窗口
function out(){
var ison=document.frames("outparam").getC('Dialog_View');
if(ison!='no'){
var links=document.links;
for ( i = 0; i < links.length ; i ++ ){
var thisurl=links[i].href.substring(links[i].href.length-1);
if(links[i].target=='' && thisurl!='#'){
links[i].attachEvent('onclick',aclick);
}
}
}
}
function aclick(){
window.showModelessDialog('/admin/common/out.htm','barwin','dialogWidth=315px;dialogheight=100px;help=no;center=yes;status=no;scroll=no');
return true;
}
window.onload=out;
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="js/car.js"></script>
<title>程序处理中</title>
<style type="text/css">
<!--
body {
background-color: #FFFFEC;
}
-->
</style></head><body>
<script language="javascript">
var thiscookie=new Cookie();
function saveState(){
thiscookie.setCookie('Dialog_View','no',24*30);
window.opener=null;
window.close();
}
function getC(name){
return thiscookie.getCookie(name);
}
</script>
<table width="300" height="50" border="0" align="center" cellpadding="4" cellspacing="0" bgcolor="#FFFFEC" style="border-collapse: collapse">
<tr>
<td colspan="2" align=center style="font-size:12px;line-height:200%">程序正在处理中.请耐心等待...
<marquee style="border:1px solid #000000" direction="right" width="300" scrollamount="5" scrolldelay="10" bgcolor="#ECF2FF">
<table cellspacing="1" cellpadding="0">
<tr height=8>
<td bgcolor=#3399FF width=8></td>
<td></td>
<td bgcolor=#3399FF width=8></td>
<td></td>
<td bgcolor=#3399FF width=8></td>
<td></td>
<td bgcolor=#3399FF width=8></td>
<td></td>
</tr></table></marquee></td>
</tr>
<tr>
<td style="font-size:12px;line-height:200%"><input type="checkbox" name="checkbox" value="checkbox" onClick="saveState()">
不再显示此对话框</td>
<td align="right" style="font-size:12px;line-height:200%"><span onClick="window.opener=null;window.close();" style="cursor:pointer; color:red; ">[关闭]</span></td>
</tr>
</table></body></html>