CODE: [Copy to clipboard]
@echo off
::::::::弹出窗口动画 {s11ss 2007-10-7}::::::::
if "%1" equ "" (
echo 参数1:弹出窗口的棱长,如200等。
echo 参数2:弹出窗口的边框颜色,如"green",或"#66ff00"等。
echo 参数3:弹出窗口的背景颜色,如"white",或"#FFFFFF"等。
echo 参数4:弹出窗口上的代码,如"Hello",或"<hr>"等。
echo.
echo 现在输入参数,如200,"green","white","Hello":
set/p popSetting=
) else (set popSetting=%1,%2,%3,%4)
for /f "tokens=1* delims=, " %%a in ('echo %popSetting%') do set widthOrHeight=%%a
set f=%tmp%\z.hta
< "%~f0" more +24 > %f%
>>%f% echo popSetting(%popSetting%);
>>%f% echo popUp();
>>%f% echo setTimeout("close();",1000*(%widthOrHeight%/50+1));
>>%f% echo ^</script^>
>>%f% echo ^<hta:application
>>%f% echo showInTaskBar=no
>>%f% echo /^>
start /w %f%
del %f%
goto :eof
<script>
window.moveTo(screen.width,screen.height);
var tableSize;
var popObject=window.createPopup();
var popTop=0;
var exiting=false;
function popUp()
{ var height,task;
if(popTop>tableSize*3)
{ exiting=true;
popTop=0;
}else{
if(exiting==true)
{ height=tableSize-popTop;
if(height==0)
{ clearTimeout(task);
popObject.hide();
return;
}
}else{
if(popTop<tableSize){height=popTop;}else{height=tableSize;}
}
}
popObject.show(screen.width-tableSize,screen.height,tableSize,height);
popTop+=10;
task=setTimeout("popUp();",50);
}
function popSetting(tableSize,tableBorderColor,tablebgColor,cellCode)
{ var tableCode;
this.tableSize=tableSize;
tableCode="<table style=\"WIDTH: "+tableSize+"px; HEIGHT: "+tableSize+"px\" borderColor="+tableBorderColor+" height="+tableSize+" cellSpacing=0 cellPadding=0 width="+tableSize+" bgColor="+tablebgColor+" border=1>";
tableCode+="<tr>";
tableCode+="<td>"+cellCode+"</td>";
tableCode+="</tr>";
tableCode+="</table>";
popObject.document.body.innerHTML=tableCode;
}