今天是

爱酷家


当前位置:首页 > 资源收藏 > 特效代码

一个由上下左右变大的窗口特效

收集整理   发布时间:2012-11-16 20:56:00   阅读

一个由上下左右变大的窗口特效

代码:
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function expandingWindow(website) {
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var leftdist = 0;    // distance to left edge of window
var topdist = 0;     // distance to top edge of window
if (document.all) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}
//  End -->
</script>
<a href="http://www.mcmx.com/" onClick="expandingWindow('http://www.mcmx.com');return false;">点击测试效果</a></body>

 



注:⊙如转载本站原创作品,请务必包保留本文地址:

内容: