Wed

04

Mar

2009

137、旋转起伏的眩目光环

137、旋转起伏的眩目光环

<script language="JavaScript">

<!--

if (document.all){

 

amount=15;

Color='#ffaaff';

GlowColor='#ff00ff';

 

ypos=0;

xpos=0;

ybase=15;

xbase=-80;

step=0.07;

currStep=0;

TrigSplit=360/amount;

MY=0;

MX=0;

C=0;

c=0.05

for (i=0; i < amount; i++)

document.write('<div id="ieDiv" style="position:absolute;top:0px;left:0px;height:20;width:20;text-align:center"><B>.</B></div>');

function orbit(){

MY=document.body.scrollTop+document.body.clientHeight/2 + document.body.clientHeight/2.8*Math.cos((C)/3)*Math.cos(C/10);

MX=document.body.scrollLeft+20+document.body.clientWidth/2.2 + document.body.clientWidth/2.4*Math.sin((C)/5)*Math.sin(C/20);

ypos=MY;

xpos=MX;

for (i=0; i < amount; i++){

var d=ieDiv[i].style;

if (d.pixelTop > ypos+2){

 {

  d.fontSize=18;

  d.paddingTop=7;

  d.filter='glow(color='+GlowColor+', strength=7)';

 }

if (d.pixelTop > ypos+10)

 {

  d.fontSize=15;

  d.paddingTop=10;

  d.filter='glow(color='+GlowColor+', strength=6)';

 }

}

else

{

 d.fontSize=25;

 d.paddingTop=0;

 d.color=Color;

 d.filter='glow(color='+GlowColor+', strength=8)';

}

d.top=ypos+ybase*Math.sin(currStep+i*TrigSplit*Math.PI/180);

d.left=xpos+xbase*Math.cos(currStep+i*TrigSplit*Math.PI/180);

}

C+=c;

currStep+=step;

setTimeout('orbit()',20);

}

window.onload=orbit;

}

// -->

</script>

0 Comments

Wed

04

Mar

2009

136、夜空漫天飞舞的流星

136、夜空漫天飞舞的流星

<script language="JavaScript1.2">

grphcs=new Array(5)

 

//PRELOAD the involved images (extend or contract variables according to # of images used)

Image0=new Image();

Image0.src=grphcs[0]="star0.gif"

Image1=new Image();

Image1.src=grphcs[1]="star1.gif"

Image2=new Image();

Image2.src=grphcs[2]="star2.gif"

Image3=new Image();

Image3.src=grphcs[3]="star3.gif"

Image4=new Image();

Image4.src=grphcs[4]="star4.gif"

 

//SPECIFY number of images to randomly display concurrently from list above. Less the more efficient

Amount=20;

Ypos=new Array();

Xpos=new Array();

Zpos=new Array();

//SpeedX=new Array();

//SpeedY=new Array();

ScrXpos=new Array();

ScrYpos=new Array();

Speed=new Array();

Size=new Array();

Step=new Array();

ns=(document.layers)?1:0;

ie=document.all&&navigator.userAgent.indexOf("Opera")==-1

 

if (ns){

for (i = 0; i < Amount; i++){

var P=Math.floor(Math.random()*grphcs.length);

rndPic=grphcs[P];

document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");

} //end for

} //end if

else if (ie){ //IE

document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');

for (i = 0; i < Amount; i++){

document.write('<img id="si'+i+'" src="'+grphcs[Math.round((i+1)*(grphcs.length-1)/Amount)]+'"style="position:absolute;top:0px;left:0px">');

}

document.write('</div></div>');

}

 

//initialize star properties

if (ie||ns){

WinHeight=(ns)?window.innerHeight-20:window.document.body.clientHeight;

WinWidth=(ns)?window.innerWidth-70:window.document.body.clientWidth;

for (i=0; i < Amount; i++){

Speed[i]=(i+1)*6/Amount+4; //speed range from 4 to 10

Xpos[i] = (Math.random()*WinWidth-WinWidth/2)*(Amount-i/3)/Amount;

Ypos[i] = (Math.random()*WinHeight-WinHeight/2)*(Amount-i/3)/Amount;

Zpos[i] = Math.random()*900*(Amount-i/3)/Amount+100;

}

}

 

function fly(){

var WinHeight=(ns)?window.innerHeight-20:window.document.body.clientHeight;

var WinWidth=(ns)?window.innerWidth-70:window.document.body.clientWidth;

var hscrll=(ns)?window.pageYOffset:document.body.scrollTop;

 

for (i=0; i < Amount; i++){

Zpos[i]-=Speed[i];

if (ScrXpos[i]>WinWidth || ScrXpos[i]<0 || ScrYpos[i]>WinHeight || ScrYpos[i]<0 || Zpos[i]<=0) { //generate new stars

Speed[i]=(i+1)*6/Amount+4; //speed range from 4 to 10

Xpos[i] = (Math.random()*WinWidth-WinWidth/2)*(Amount-i/3)/Amount;

Ypos[i] = (Math.random()*WinHeight-WinHeight/2)*(Amount-i/3)/Amount;

Zpos[i] = Math.random()*900*(Amount-i/3)/Amount+100;

}

ScrXpos[i]=Xpos[i]/Zpos[i]*100 + WinWidth/2;

ScrYpos[i]=Ypos[i]/Zpos[i]*100 + WinHeight/2;

 

if (ns){

document.layers['sn'+i].left=ScrXpos[i];

document.layers['sn'+i].top=ScrYpos[i]+hscrll;

}

else{ //IE

eval("document.all.si"+i).style.left=ScrXpos[i];

eval("document.all.si"+i).style.top=ScrYpos[i]+hscrll;

}

} //end for

setTimeout('fly()',20);

} //end fly

 

if (ie||ns)

window.onload=fly

//-->

</SCRIPT>

 

0 Comments

Wed

04

Mar

2009

135、不同背景色选择效果

135、不同背景色选择效果

<script language="JavaScript">

lck=0;

function r(hval)

{

if ( lck == 0 )

{

document.bgColor=hval;

}

}

function l()

{

if (lck == 0)

{

lck = 1;

}

else

{

lck = 0;

}

}

</script>

<table border="0" cellpadding="0" border="0">

<tr>

<td bgcolor="#00ffff"><a href="JavaScript:l()" onmouseover="r('#00ffff'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#663399"><a href="JavaScript:l()" onmouseover="r('#663399'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#669933"><a href="JavaScript:l()" onmouseover="r('#669933'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#990033"><a href="JavaScript:l()" onmouseover="r('#990033'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#666600"><a href="JavaScript:l()" onmouseover="r('#666600'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#663366"><a href="JavaScript:l()" onmouseover="r('#663366'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#000000"><a href="JavaScript:l()" onmouseover="r('#000000'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#FF0000"><a href="JavaScript:l()" onmouseover="r('#FF0000'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#CC6600"><a href="JavaScript:l()" onmouseover="r('#CC6600'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#CC3399"><a href="JavaScript:l()" onmouseover="r('#CC3399'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#666699"><a href="JavaScript:l()" onmouseover="r('#666699'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#660033"><a href="JavaScript:l()" onmouseover="r('#660033'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#330033"><a href="JavaScript:l()" onmouseover="r('#330033'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#333300"><a href="JavaScript:l()" onmouseover="r('#333300'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#FFFF00"><a href="JavaScript:l()" onmouseover="r('#FFFF00'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#9900CC"><a href="JavaScript:l()" onmouseover="r('#9900CC'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#FFCC66"><a href="JavaScript:l()" onmouseover="r('#FFCC66'); return true"><img src="" border="0" width="10" height="10"></a></td>

<td bgcolor="#FFFFFF"><a href="JavaScript:l()" onmouseover="r('#FFFFFF'); return true"><img src="" border="0" width="10" height="10"></a></td>

    </tr>

</table>

0 Comments

Wed

04

Mar

2009

134、页面背景渐变特效

134、页面背景渐变特效

<BODY style="width:100%; height:100%;background:gold;filter:alpha(opacity=0,finishopacity=100,style=1,startx=100,starty=100,finishx=0,finishy=0)">

 

0 Comments

Wed

04

Mar

2009

132、滚动显示的LOGO

132、滚动显示的LOGO

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT language="JavaScript">

<!--

var scrollerwidth=88

var scrollerheight=31

var scrollerbgcolor='white'

//每个图间暂停3秒。

var pausebetweenimages=3000

 

 

//边界下面的行,如果希望logo都是带连接的,只要加上<a>标签即可。

var slideimages=new Array()

slideimages[0]='<A href=http://www.7stk.com target=_blank><IMG alt=痴人可不是傻子 border=0 height=31 src=chir.gif width=88></A>'

slideimages[1]='<A href=http://www.sina.com target=_blank><IMG alt=紫巾苑 border=0 height=31 src=zjlogo.gif width=88></A>'

slideimages[2]='<A href=http://www.7stk.com/shubiao/shubiao.htm target=_blank><IMG alt=鼠标特效代码 border=0 height=31 src=bhlogo.gif width=88></A>'

slideimages[3]='<A href=http://www.7stk.com/music/music.htm target=_blank><IMG alt=播放器代码 border=0 height=31 src=tdyn.gif width=88></A>'

slideimages[4]='<A href=http://www.7stk.com/sj/sj.htm target=_blank><IMG alt=手机铃声 border=0 height=31 src=home2.gif width=88></A>'

//尽管填加更多的。

 

 

if (slideimages.length>1)

i=2

else

i=0

 

function move1(whichlayer){

tlayer=eval(whichlayer)

if (tlayer.top>0&&tlayer.top<=5){

tlayer.top=0

setTimeout("move1(tlayer)",pausebetweenimages)

setTimeout("move2(document.main.document.second)",pausebetweenimages)

return

}

if (tlayer.top>=tlayer.document.height*-1){

tlayer.top-=5

setTimeout("move1(tlayer)",100)

}

else{

tlayer.top=scrollerheight

tlayer.document.write(slideimages[i])

tlayer.document.close()

if (i==slideimages.length-1)

i=0

else

i++

}

}

 

function move2(whichlayer){

tlayer2=eval(whichlayer)

if (tlayer2.top>0&&tlayer2.top<=5){

tlayer2.top=0

setTimeout("move2(tlayer2)",pausebetweenimages)

setTimeout("move1(document.main.document.first)",pausebetweenimages)

return

}

if (tlayer2.top>=tlayer2.document.height*-1){

tlayer2.top-=5

setTimeout("move2(tlayer2)",100)

}

else{

tlayer2.top=scrollerheight

tlayer2.document.write(slideimages[i])

tlayer2.document.close()

if (i==slideimages.length-1)

i=0

else

i++

}

}

 

function move3(whichdiv){

tdiv=eval(whichdiv)

if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){

tdiv.style.pixelTop=0

setTimeout("move3(tdiv)",pausebetweenimages)

setTimeout("move4(second2)",pausebetweenimages)

return

}

if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){

tdiv.style.pixelTop-=5

setTimeout("move3(tdiv)",100)

}

else{

tdiv.style.pixelTop=scrollerheight

tdiv.innerHTML=slideimages[i]

if (i==slideimages.length-1)

i=0

else

i++

}

}

 

function move4(whichdiv){

tdiv2=eval(whichdiv)

if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){

tdiv2.style.pixelTop=0

setTimeout("move4(tdiv2)",pausebetweenimages)

setTimeout("move3(first2)",pausebetweenimages)

return

}

if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){

tdiv2.style.pixelTop-=5

setTimeout("move4(second2)",100)

}

else{

tdiv2.style.pixelTop=scrollerheight

tdiv2.innerHTML=slideimages[i]

if (i==slideimages.length-1)

i=0

else

i++

}

}

 

function startscroll(){

if (document.all){

move3(first2)

second2.style.top=scrollerheight

}

else if (document.layers){

move1(document.main.document.first)

document.main.document.second.top=scrollerheight+5

document.main.document.second.visibility='show'

}

}

 

window.onload=startscroll

 

 

//-->

 

 

</SCRIPT>

 

 

第二步:把如下代码加入<body>区域中

<ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgcolor=&{scrollerbgcolor};>

<layer id="first" left=0 top=1 width=&{scrollerwidth};>

<script language="JavaScript1.2">

if (document.layers)

document.write(slideimages[0])

</script>

</layer>

<layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide>

<script language="JavaScript1.2">

if (document.layers)

document.write(slideimages[1])

</script>

</layer>

</ilayer>

<p>

<SCRIPT language="JavaScript">

<!--

if (document.all){

document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')

document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')

document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')

document.write(slideimages[0])

document.writeln('</div>')

document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">')

document.write(slideimages[1])

document.writeln('</div>')

document.writeln('</div>')

document.writeln('</span>')

}

//-->

 

 

</SCRIPT>

 

2 Comments

Wed

04

Mar

2009

131、页面自动滚屏效果

131、页面自动滚屏效果

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT language="JavaScript">

<!--

function scrollit(){

for (I=1; I<=500; I++){

parent.scroll(1,I)

}

}

 

 

//-->

</SCRIPT>

 

第二步:把如下代码加入<body>区域中

<div id="glowdiv" style="position:absolute;visibility:visible;width:600px;text-align:center; top:185px;left:70px;font-family:隶书;font-size:30pt;color:000000"></div>

 

第三步:<body>区中内容改为

<body bgcolor="#fef4d9" onload="scrollit()">

 

0 Comments

Wed

04

Mar

2009

130、星星满天闪烁

130、星星满天闪烁

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT language=javascript1.2>

<!--

hexa = new Array(16);

for(var i = 0; i < 10; i++) hexa[i] = i;

hexa[10]="a";

hexa[11]="b";

hexa[12]="c";

hexa[13]="d";

hexa[14]="e";

hexa[15]="f";

function hex(i)

{

if (i < 0) return "00";

else if (i > 255) return "ff";

else return "" + hexa[Math.floor(i/16)] + hexa[i%16];

}

function setbgColor(r, g, b)

{

var hr = hex(r);

var hg = hex(g);

var hb = hex(b);

document.bgColor = "#"+hr+hg+hb;

}

function fade(sr, sg, sb, er, eg, eb, step)

{

for(var i = 0; i <= step; i++)

{

setbgColor( Math.floor(sr * ((step-i)/step) + er * (i/step)),

Math.floor(sg * ((step-i)/step) + eg * (i/step)), Math.floor(sb *

((step-i)/step) + eb * (i/step)));

}

}

 

 

//-->

</SCRIPT>

 

 

第二步:把如下代码加入<body>区域中

<SCRIPT language=javascript1.2>

<!--

for(i=1;i<=10;i++)

{

document.write("<div id=\"star"+i+"\" style=\"position:absolute;top:80%;left:"+(Math.floor(Math.random()*5)+9*(i-1))+"%;width:21;height:21;visibility:hidden;\"><dd><img src=\"star.gif\" WIDTH=\"21\" HEIGHT=\"21\"></dd></div>");

}    

function randommove()

{    

       for(i=1;i<=10;i++)

       eval("star"+i+".style.top=get_top()");

      

}           

 

function get_top()

{

var t,t2;

t=Math.floor(Math.random()*380);

t2=t.toString()+"px";

return(t2);

}

function set_visible()

{

       for(i=1;i<=10;i++)

       eval("star"+i+".style.visibility=\"visible\"");

       banner.style.visibility="visible";

       friends.style.visibility="visible";

       high(pic);

             

}

function bar_show()

{     bar.style.visibility="visible";

}

function start_it()

{

fade(255,255,255, 0,0,0, 50);

setInterval("randommove()",1000);

set_visible();

setTimeout("bar_show()",2000);

}

function end_it()

{

banner.style.visibility="hidden";

friends.style.visibility="hidden";

pic.style.visibility="hidden";

fade(0,0,0,255,255,255,10);

}

-->

</SCRIPT>

 

第三步:<body>改为

<BODY aLink=#ffffff bgColor=#ffffff link=#ffffff onload=start_it()

onunload=end_it() text=#ffffff topMargin=0 vLink=#ffffff>

0 Comments

Wed

04

Mar

2009

129、打开页面颜色渐变

129、打开页面颜色渐变

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT Language="JavaScript">

<!-- 屏幕变色程序 -->

function BgColor()

{

var x = 0, step = 1

while( x <= 0xffffff)

        {

document.bgColor = x

x += step

step <<= 8

if( step >= 0x1000000) step = 1

}

}

BgColor()

</Script>

 

 

第二步:把<body>中的内容改为:

<body bgcolor="#fef4d9" onLoad="BgColor()">

 

0 Comments

Wed

04

Mar

2009

128、页面上下滚动

128、页面上下滚动

脚本说明:

第一步:把如下代码加入<head>区域中

 

<style type="text/css">

#item {position:absolute; visibility:hidden; left:0px}

</style>

 

<SCRIPT LANGUAGE="JavaScript">

 

 

<!-- Begin

var isNS=(document.layers);

var _all=(isNS)? '' : 'all.' ;

var _style=(isNS)? '' : '.style' ;

var _visible=(isNS)? 'show' : 'visible';

var w_x, w_y, item, okscroll=false, godown;

function init(){

item=eval('document.'+_all+'item'+_style);

getwindowsize();

item.visibility=_visible;

scrollpage();

}

function getwindowsize() {

w_x=(isNS)? window.innerWidth-5 : document.body.clientWidth;

w_y=(isNS)? window.innerHeight : document.body.clientHeight;

(isNS)? item.clip.width=42: item.width=42;

(isNS)? item.clip.height=20 : item.height=20;

moveitem();

}

function resizeNS() {

setTimeout('document.location.reload()',400);

}

function moveitem() {

if (isNS) {

item.moveTo((pageXOffset+w_x-70),(w_y+pageYOffset-50))

}else{

item.pixelLeft=document.body.scrollLeft+w_x-70;

item.pixelTop=w_y+document.body.scrollTop-50;

   }

}

window.onload=init;

(isNS) ? window.onresize=resizeNS : window.onresize=getwindowsize ;

function scrollpage() {

status = '';

if (okscroll) {

if (godown) {

(isNS)? window.scrollBy(0,4) : window.scrollBy(0,4) ;

} else {

(isNS)? window.scrollBy(0,-4) : window.scrollBy(0,-4) ;

   }

}

moveitem();

setTimeout('scrollpage()', 40);

}

//  End -->

</script>

 

 

 

 

第二步:把如下代码加入<body>区域中

<div id="item">

<a href="javascript:void(0)" onMouseover="okscroll=true; godown=true"

onMouseout="okscroll=false"><img src="down.gif" border="0"></a><a href="javascript:void(0)"

onMouseover="okscroll=true; godown=false" onMouseout="okscroll=false"><img src="up.gif"

border="0"></a>

</div>

 

0 Comments

Wed

04

Mar

2009

127、图片满天飞舞

127、图片满天飞舞

脚本说明:

第一步:把如下代码加入<head>区域中

<script language="JavaScript">

<!--//

 

//设置下面一些参数,小球移动速度1-50,数值大速度快;

var ballWidth = 40;

var ballHeight = 40;

var BallSpeed = 10;

 

var maxBallSpeed = 50;

var xMax;

var yMax;

var xPos = 0;

var yPos = 0;

var xDir = 'right';  //水平方向向右移动

var yDir = 'down'; //垂直方向向下移动

var superballRunning = true;

var tempBallSpeed;

var currentBallSrc;

var newXDir;

var newYDir;

 

function initializeBall() {

   if (document.all) {

      xMax = document.body.clientWidth

      yMax = document.body.clientHeight

      document.all("superball").style.visibility = "visible";

      }

   else if (document.layers) {

      xMax = window.innerWidth;

      yMax = window.innerHeight;

      document.layers["superball"].visibility = "show";

      }

   setTimeout('moveBall()',400);

   }

 

function moveBall() {

   if (superballRunning == true) {

      calculatePosition();

      if (document.all) {

         document.all("superball").style.left = xPos + document.body.scrollLeft;

         document.all("superball").style.top = yPos + document.body.scrollTop;

         }

      else if (document.layers) {

         document.layers["superball"].left = xPos + pageXOffset;

         document.layers["superball"].top = yPos + pageYOffset;

         }

      setTimeout('moveBall()',30);

      }

   }

 

function calculatePosition() {

   if (xDir == "right") {

      if (xPos > (xMax - ballWidth - BallSpeed)) {

         xDir = "left";

         }

      }

   else if (xDir == "left") {

      if (xPos < (0 + BallSpeed)) {

         xDir = "right";

         }

      }

   if (yDir == "down") {

      if (yPos > (yMax - ballHeight - BallSpeed)) {

         yDir = "up";

         }

      }

   else if (yDir == "up") {

      if (yPos < (0 + BallSpeed)) {

         yDir = "down";

         }

      }

   if (xDir == "right") {

      xPos = xPos + BallSpeed;

      }

   else if (xDir == "left") {

      xPos = xPos - BallSpeed;

      }

   else {

      xPos = xPos;

      }

   if (yDir == "down") {

      yPos = yPos + BallSpeed;

      }

   else if (yDir == "up") {

      yPos = yPos - BallSpeed;

      }

   else {

      yPos = yPos;

      }

   }

 

if (document.all||document.layers)

window.onload = initializeBall;

window.onresize = new Function("window.location.reload()");

 

// -->

</script>

<style type="text/css">

 

#superball {

position:absolute;

left:0;

top:0;

visibility:hide;

visibility:hidden;

width:40;

height:40;

}

 

</style>

 

 

 

第二步:把如下代码加入区域中:

<span id="superball"><a href="http://www.javascript2000.com"><img name="superballImage" src="cat.gif" height="30" width="30" border="0"></a></span>

0 Comments

Wed

04

Mar

2009

126、页面掉下去

126、页面掉下去

脚本说明:

第一步:把如下代码加入<head>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://www.javascript2000.com -->

 

<!-- Begin

function moveWin() {

for (var i = 1; i < 1001; i++)

window.moveBy(1, 1);

window.moveBy(-1000, -1000);

}

//  End -->

</script>

 

 

 

第二步:把如下代码加入区域中:

<form>

<input type=button value="Slide to Yahoo" onClick="moveWin();window.location.href='http://www.yahoo.com';">

</form>

<br>

<a href="http://www.excite.com"; onClick="moveWin()">Slide to Excite</a>

 

0 Comments

Wed

04

Mar

2009

125、页面向右滚屏

125、页面向右滚屏

脚本说明:

把如下代码加入<body>区域中:

<SCRIPT Language="JavaScript">

<!--

 

function scrollit(){

        for (H=0; H<=4500; H++){        

                parent.scroll(H,0) 

        }

}                                                    

//-->

</SCRIPT>

<input type=button value="Push and follow me!" onClick="scrollit()">

<FONT SIZE="+4">........................................i..love..javascript..very..much!</FONT>

0 Comments

Wed

04

Mar

2009

124、非常综合的页面特效

124、非常综合的页面特效

 

 

0 Comments

Wed

04

Mar

2009

123、打开页面特效5

123、打开页面特效5

脚本说明:

把如下代码加入<body>区域中:

<style>

<!--

.intro {

position:absolute;

left:0;

top:0;

layer-background-color:green;

background-color:green;

border:0.1px solid green

}

-->

</style>

<div id="p1" class="intro">

</div>

<div id="p2" class="intro">

</div>

<div id="p3" class="intro">

</div>

<div id="p4" class="intro">

</div>

<div id="p5" class="intro">

</div>

<div id="p6" class="intro">

</div>

<div id="p7" class="intro">

</div>

<div id="p8" class="intro">

</div>

<div id="p9" class="intro">

</div>

<div id="p10" class="intro">

</div>

<div id="p11" class="intro">

</div>

<div id="p12" class="intro">

</div>

<div id="p13" class="intro">

</div>

<div id="p14" class="intro">

</div>

<div id="p15" class="intro">

</div>

<div id="p16" class="intro">

</div>

<div id="p17" class="intro">

</div>

<div id="p18" class="intro">

</div>

<div id="p19" class="intro">

</div>

<div id="p20" class="intro">

</div>

<div id="p21" class="intro">

</div>

<div id="p22" class="intro">

</div>

<div id="p23" class="intro">

</div>

<div id="p24" class="intro">

</div>

<div id="p25" class="intro">

</div>

<script>

var espeed=300

var counter=1

var temp=new Array()

var temp2=new Array()

 

 

if (document.layers){

for (i=1;i<=25;i++){

temp[i]=eval("document.p"+i+".clip")

temp2[i]=eval("document.p"+i)

temp[i].width=window.innerWidth/5

temp[i].height=window.innerHeight/5

}

 

for (i=1;i<=5;i++)

temp2[i].left=(i-1)*temp[i].width

 

for (i=6;i<=10;i++){

temp2[i].left=(i-6)*temp[i].width

temp2[i].top=temp[i].height

}

 

for (i=11;i<=15;i++){

temp2[i].left=(i-11)*temp[i].width

temp2[i].top=2*temp[i].height

}

 

for (i=16;i<=20;i++){

temp2[i].left=(i-16)*temp[i].width

temp2[i].top=3*temp[i].height

}

 

for (i=21;i<=25;i++){

temp2[i].left=(i-21)*temp[i].width

temp2[i].top=4*temp[i].height

}

 

}

 

function erasecontainerns(){

window.scrollTo(0,0)

var whichcontainer=Math.round(Math.random()*25)

if (whichcontainer==0)

whichcontainer=1

if (temp2[whichcontainer].visibility!="hide")

temp2[whichcontainer].visibility="hide"

else{

while (temp2[whichcontainer].visibility=="hide"){

whichcontainer=Math.round(Math.random()*25)

if (whichcontainer==0)

whichcontainer=1

}

temp2[whichcontainer].visibility="hide"

}

if (counter==25)

clearInterval(beginerase)

 

counter++

espeed-=10

 

}

 

 

 

if (document.all)

{

var containerwidth=parseInt(document.body.clientWidth/5)

var containerheight=parseInt(document.body.offsetHeight/5)

 

for (i=1;i<=25;i++){

temp[i]=eval("document.all.p"+i+".style")

temp[i].width=containerwidth

temp[i].height=containerheight

}

 

for (i=1;i<=5;i++)

temp[i].left=(i-1)*containerwidth

 

for (i=6;i<=10;i++){

temp[i].left=(i-6)*containerwidth

temp[i].top=containerheight

}

 

for (i=11;i<=15;i++){

temp[i].left=(i-11)*containerwidth

temp[i].top=2*containerheight

}

 

for (i=16;i<=20;i++){

temp[i].left=(i-16)*containerwidth

temp[i].top=3*containerheight

}

 

for (i=21;i<=25;i++){

temp[i].left=(i-21)*containerwidth

temp[i].top=4*containerheight

}

}

 

function erasecontainerie(){

var whichcontainer=Math.round(Math.random()*25)

if (whichcontainer==0)

whichcontainer=1

if (temp[whichcontainer].visibility!="hidden")

temp[whichcontainer].visibility="hidden"

 

else{

while (temp[whichcontainer].visibility=="hidden"){

whichcontainer=Math.round(Math.random()*25)

if (whichcontainer==0)

whichcontainer=1

}

temp[whichcontainer].visibility="hidden"

}

 

if (counter==25){

clearInterval(beginerase)

clearInterval(keeptop)

}

counter++

espeed-=10

 

}

 

if (document.layers)

beginerase=setInterval("erasecontainerns()",espeed)

else if (document.all){

beginerase=setInterval("erasecontainerie()",espeed)

keeptop=setInterval("window.scrollTo(0.0)",100)

}

</script>

 

0 Comments

Wed

04

Mar

2009

122、打开页面特效4

122、打开页面特效4

脚本说明:

把如下代码加入<body>区域中:

<div id="i1" class="intro">

</div>

<div id="i2" class="intro">

</div>

<script language="JavaScript1.2">

var speed=20

var temp=new Array()

var temp2=new Array()

if (document.layers){

for (i=1;i<=2;i++){

temp[i]=eval("document.i"+i+".clip")

temp2[i]=eval("document.i"+i)

temp[i].width=window.innerWidth/2

temp[i].height=window.innerHeight

temp2[i].left=(i-1)*temp[i].width

}

}

else if (document.all){

var clipright=document.body.clientWidth/2,clipleft=0

for (i=1;i<=2;i++){

temp[i]=eval("document.all.i"+i+".style")

temp[i].width=document.body.clientWidth/2

temp[i].height=document.body.offsetHeight

temp[i].left=(i-1)*parseInt(temp[i].width)

}

}

 

 

function openit(){

window.scrollTo(0,0)

if (document.layers){

temp[1].right-=speed

temp[2].left+=speed

if (temp[2].left>window.innerWidth/2)

clearInterval(stopit)

}

else if (document.all){

clipright-=speed

temp[1].clip="rect(0 "+clipright+" auto 0)"

clipleft+=speed

temp[2].clip="rect(0 auto auto "+clipleft+")"

if (clipright<=0)

clearInterval(stopit)

}

}

 

function gogo(){

stopit=setInterval("openit()",100)

}

gogo()

 

</script>

<style>

<!--

.intro {

position:absolute;

left:0;

top:0;

layer-background-color:red;

background-color:red;

border:0.1px solid red

}

-->

</style>

0 Comments

Wed

04

Mar

2009

121、打开页面特效3

121、打开页面特效3

脚本说明:

把如下代码加入<body>区域中:

<div id="i1" class="intro">

</div>

<div id="i2" class="intro">

</div>

<script language="JavaScript1.2">

var speed=20

var temp=new Array()

var temp2=new Array()

if (document.layers){

for (i=1;i<=2;i++){

temp[i]=eval("document.i"+i+".clip")

temp2[i]=eval("document.i"+i)

temp[i].width=window.innerWidth

temp[i].height=window.innerHeight/2

temp2[i].top=(i-1)*temp[i].height

}

}

else if (document.all){

var clipbottom=document.body.offsetHeight/2,cliptop=0

for (i=1;i<=2;i++){

temp[i]=eval("document.all.i"+i+".style")

temp[i].width=document.body.clientWidth

temp[i].height=document.body.offsetHeight/2

temp[i].top=(i-1)*parseInt(temp[i].height)

}

}

 

function openit(){

window.scrollTo(0,0)

if (document.layers){

temp[1].bottom-=speed

temp[2].top+=speed

if (temp[1].bottom<=0)

clearInterval(stopit)

}

else if (document.all){

clipbottom-=speed

temp[1].clip="rect(0 auto+"+clipbottom+" 0)"

cliptop+=speed

temp[2].clip="rect("+cliptop+" auto auto)"

if (clipbottom<=0)

clearInterval(stopit)

}

}

function gogo(){

stopit=setInterval("openit()",100)

}

gogo()

 

</script>

<style>

<!--

.intro {

position:absolute;

left:0;

top:0;

layer-background-color:Aqua;

background-color:Aqua;

border:0.1px solid Aqua

}

-->

</style>

 

0 Comments