加入收藏-方便您以后查找网页特效哦
你的位置:
主页
>>
窗口特效
打开页面弹出飘浮窗口
1.加入如下代码到body区域
<script> var URL= "flyingwindow_show.html"; // Set size of popup var W= 130; // not less than 100 var H= 180; // not less than 100 // Set margin from edge of screen var M= 100; // Set speed var speed = 20; // Set increment of motion var increment = 16; // Do not edit below this line //============================ var nowY=M;var nowX=M; var theWidth=window.screen.width; var theHeight=window.screen.height; var limitX=theWidth-W-M; var limitY=theHeight-H-M; var s="width="+W+",height="+H; function doFlyMe(){ P=window.open(URL,"A",s); P.resizeTo(W,H); P.moveTo(M,M); P.focus(); D();} function D(){ if (nowY<=limitY){ P.moveTo(nowX,nowY); P.focus(); nowY+=increment; T=setTimeout("D()",speed); }else{ clearTimeout(T); nowY=limitY; P.moveTo(nowX,nowY); P.focus(); R();}} function R(){ if (nowX<=limitX){ P.moveTo(nowX,nowY); P.focus(); nowX+=increment; T=setTimeout("R()",speed); }else{ clearTimeout(T); nowX=limitX; P.moveTo(nowX,nowY); P.focus(); U();}} function U(){ if (nowY>=M){ P.moveTo(nowX,nowY); P.focus(); nowY-=increment; T=setTimeout("U()",speed); }else{ clearTimeout(T) nowY=M; P.moveTo(nowX,nowY); P.focus(); L();}} function L(){ if (nowX>=M){ P.moveTo(nowX,nowY); P.focus(); nowX-=increment; T=setTimeout("L()",speed); }else{ clearTimeout(T); nowX=M; P.moveTo(nowX,nowY); P.focus();}} </script>
2.把<body>中的内容改为:
<body onload="doFlyMe()">
COPYRIGHT © 2003-2005 ALL RIGHTS RESERVED
业务联系
|
广告服务
|
网站建设
|
关于我们
|
免责声明
月光宝盒工作室
800*600