给你一个JS的吧,代码如下:
<html> <head> <title> ☆单身情歌☆ </title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"> </head> <body bgcolor=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\"> <IMG id=\"img1\" src=\"http://pimg.qihoo.com/qhimg/baike/600_449/1f/04/92/1f0492bq119bdb.a4a0b3.jpg\" width=\"700\" height=\"540\"> <SCRIPT language=JavaScript><!-- var bcolor=\"#ffffff\"// var numax=50;// ccolor=new Array(\"#999999\",\"#ff9900\",\"#dd0000\",\"#ccffff\",\"#0000ff\",\"#9cdc3d\",\"#444444\",\"#ff99ff\"); img1.style.filter=\"progidXImageTransform.Microsoft.Light()\" iii=0 col=\"0123456789abcdef\" rr=col.indexOf(ccolor[0].substring(1,2))*16+col.indexOf(ccolor[0].substring(2,3)); gg=col.indexOf(ccolor[0].substring(3,4))*16+col.indexOf(ccolor[0].substring(4,5)); bb=col.indexOf(ccolor[0].substring(5,6))*16+col.indexOf(ccolor[0].substring(6,7)); eval(\"img1.filters[\'DXImageTransform.Microsoft.Light\'].addAmbient(\"+rr+\",\"+gg+\",\"+bb+\",100)\") iii=1 function changecolor(num,r,g,b){ if(num==0){ r=col.indexOf(ccolor[iii].substring(1,2))*16+col.indexOf(ccolor[iii].substring(2,3)); g=col.indexOf(ccolor[iii].substring(3,4))*16+col.indexOf(ccolor[iii].substring(4,5)); b=col.indexOf(ccolor[iii].substring(5,6))*16+col.indexOf(ccolor[iii].substring(6,7)); } //status=num+\",\"+((r-rr)*num/numax+rr)+\",\"+((g-gg)*num/numax+gg)+\",\"+((b-bb)*num/numax+bb) eval(\"img1.filters[\'DXImageTransform.Microsoft.Light\'].changecolor(0,\"+((r-rr)*num/numax+rr)+\",\"+((g-gg)*num/numax+gg)+\",\"+((b-bb)*num/numax+bb)+\",100)\") //eval(\"img1.filters[\'DXImageTransform.Microsoft.Light\'].addAmbient(\"+((r-rr)*num/numax+rr)+\",\"+((g-gg)*num/numax+gg)+\",\"+((b-bb)*num/numax+bb)+\",100)\") if(num<numax){ num=num+1; setTimeout(\'changecolor(\'+num+\',\'+r+\',\'+g+\',\'+b+\')\',100) }else{ num=0; rr=r; gg=g; bb=b; iii=iii+1; if(iii>ccolor.length-1) iii=0; setTimeout(\'changecolor(\'+num+\',\'+r+\',\'+g+\',\'+b+\')\',2000) } } changecolor(0); // --> </SCRIPT> </body></html> |