WEB开发网
开发学院网页设计JavaScript 如果你想打开一个新页面时给浏览者一些惊喜的话,... 阅读

如果你想打开一个新页面时给浏览者一些惊喜的话,试试这个

 2007-11-27 17:56:16 来源:WEB开发网   
核心提示:<HTML><HEAD><META name=GENERATOR content=IBM HomePage Builder 2001 V5.0.0 for Windows><TITLE></TITLE></HEAD><BODY><

<HTML>
<HEAD>
<META name=GENERATOR content=IBM HomePage Builder 2001 V5.0.0 for Windows>
<TITLE></TITLE>
</HEAD>
<BODY><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.51js.com onClick=expandingWindow(http://www.51js.com);return false;>无忧脚本</a></BODY>
</HTML>

Tags:如果 打开 一个

编辑录入:coldstar [复制链接] [打 印]
赞助商链接