universe
写手
写手
  • 铜币0枚
  • 威望0点
  • 贡献值0点
阅读:486回复:4

飞啊飞啊好多图啊

楼主#
更多 发布于:2007-02-15 22:28
来点有意思的,用IE,IE7没试验过

随便开一个网页,把地址栏清除,然后copy以下内容

javaxcript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);

回车
小心的问一句,我写的你的明白?
chocolate5215
著名写手
著名写手
  • 铜币9枚
  • 威望0点
  • 贡献值0点
1C#
发布于:2007-02-16 01:44
Re:飞啊飞啊好多图啊
蝦米反應都目有

`.`
[img]http://www.memail.net/images3/682771441632957957_71198.jpg[/img]
universe
写手
写手
  • 铜币0枚
  • 威望0点
  • 贡献值0点
2C#
发布于:2007-02-16 11:21
Re:飞啊飞啊好多图啊
效果如下

小心的问一句,我写的你的明白?
suchasplus
作家
作家
  • 铜币16枚
  • 威望11点
  • 贡献值1点
3C#
发布于:2007-02-16 20:44
Re:飞啊飞啊好多图啊
开始写成javaXcript了
The history of these days will be written in blood... By crushing the armies of our enemy, by seizing the weapons they thought to turn against us, we were fighting for our very existence!
suchasplus
作家
作家
  • 铜币16枚
  • 威望11点
  • 贡献值1点
4C#
发布于:2007-02-16 20:50
Re:飞啊飞啊好多图啊
来个重新排版~
javascript:
R=0; 
x1=.1; 
y1=.05; 
x2=.25; 
y2=.24; 
x3=1.6; 
y3=.24; 
x4=300; 
y4=200; 
x5=300; 
y5=200; 
DI=document.images; 
DIL=DI.length; 
function A(){
	for(i=0; i-DIL; i++){
		DIS=DI[ i ].style; 
		DIS.position='absolute';
		DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; 
		DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5
	}
	R++
}
setInterval('A()',5); 
void(0);


厄~
明显的~使用javascript控制DHTML
利用自定义的A函数来控制HTML文档中image属性的图片的绝对定位位置
再利用setInterval来控制位置变换 [ 2007-02-16 20:52:24 suchasplus 修改 ]
The history of these days will be written in blood... By crushing the armies of our enemy, by seizing the weapons they thought to turn against us, we were fighting for our very existence!
游客

返回顶部