<script> <!-- var winheight = 100 var winsize = 100 var y = 5 var mylocation; function go(url) { win2=window.open("","","scrollbars") if (!document.layers&&!document.all){ win2.location = mylocation return } win2.resizeTo(100,100) win2.moveTo(0,0) mylocation = url; go2() }
function go2(){ if (winheight >= (screen.availHeight - 30)) y = 0 win2.resizeBy(5, y) winheight += 5 winsize += 5 if (winsize >= (screen.width - 5)) { win2.location = mylocation; winheight = 100 winsize = 100 y = 5 return } setTimeout("go2()",50) } //--> </script>
说明:上面代码放到<head>区 按钮代码:<input type="button" value="看看效果" name="B2" onclick="go("go.htm")"> 你也可以用<body onload="go("go.htm")">调用函数
|