TiTi 发表于 2006-11-22 15:41
由于当IE浏览页面时,可直接在地址拦输入javascript,并且直接执行。。<br />让阅读者可以做任何javascript能办到的事。。。(也许其中大部分都是网站制作者不愿看到的)<br /><br />有位达人就写了如下代码:<br /><br /><!--c1--><div class='codetop'>代码</div><div class='codemain'><!--ec1-->java script: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);<!--c2--></div><!--ec2--><br /><br />当你浏览任意网页时,将上面这段代码输入地址栏,然后回车,就能看到网页上的所有图片随风,满天飞舞了!<br /><br />有兴趣的试试(记得只能是IE中哦),觉得好玩的话要记得回贴哦。。让其他人也能看到。独乐乐不如众乐乐<br /><br />这段代码格式之后是这样的:<br /><!--c1--><div class='codetop'>代码</div><div class='codemain'><!--ec1-->R=0;<br />x1=.1;<br />y1=.05;<br />x2=.25;<br />y2=.24;<br />x3=1.6;<br />y3=.24;<br />x4=300;<br />y4=200;<br />x5=300;<br />y5=200;<br />DI=document.images;<br />DIL=DI.length;<br />function A()<br />{<br /> for(i=0; i-DIL; i++)<br /> {<br /> DIS=DI[ i ].style;<br /> DIS.position='absolute';<br /> DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5;<br /> DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5;<br /> }<br /> R++;<br />}<br />setInterval('A()',5);<br />void(0);<!--c2--></div><!--ec2--><br /><br />有兴趣的朋友可以改来试试,可以玩出更多的花样哦!<br /><br /><br />//////////////////////<br />移动到Internet Explorer版<br />金箭
kavc 发表于 2006-11-22 15:45
<img src="http://forums.mozine.cn/style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> 很早的帖子了,分享了
浪孖殘雪 发表于 2006-11-22 23:28
真的啊,还第一次看到呢
liu0817cn 发表于 2007-2-5 12:15
我在6.0中试了显示无法打开啊
cuthead 发表于 2007-2-5 13:03
IE 7下不工作,貌似这个脚本年代久远,报告完毕
Flashere 发表于 2007-2-5 14:35
有意思。。<br /> <img src="http://forums.mozine.cn/style_emoticons/<#EMO_DIR#>/sleep.gif" style="vertical-align:middle" emoid="-_-" border="0" alt="sleep.gif" /> <br />相信在Maxthon 也会发生这样的事情 不过没有办法实验 因为没有安装。。
cuthead 发表于 2007-2-5 17:32
<!--quoteo(post=77998:date=2007年2月5日 2:35 PM:name=Flashere)--><div class='quotetop'>引用 (Flashere @ 2007年2月5日 2:35 PM) <a href="index.php?act=findpost&pid=77998"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->有意思。。<br /> <img src="http://forums.mozine.cn/style_emoticons/<#EMO_DIR#>/sleep.gif" style="vertical-align:middle" emoid="-_-" border="0" alt="sleep.gif" /> <br />相信在Maxthon 也会发生这样的事情 不过没有办法实验 因为没有安装。。<!--QuoteEnd--></div><!--QuoteEEnd--><br />绝对不工作,我以前测试过
凯杰 发表于 2007-2-5 23:46
其实javascript中: javascipt中间不可以有空格分开....<br />大家将java script中的空格去掉再尝试!
凯杰 发表于 2007-2-6 00:04
<!--quoteo(post=78030:date=2007年2月5日 5:32 PM:name=cuthead)--><div class='quotetop'>引用 (cuthead @ 2007年2月5日 5:32 PM) <a href="index.php?act=findpost&pid=78030"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=77998:date=2007年2月5日 2:35 PM:name=Flashere)--><div class='quotetop'>引用 (Flashere @ 2007年2月5日 2:35 PM) <a href="index.php?act=findpost&pid=77998"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->有意思。。<br /> <img src="http://forums.mozine.cn/style_emoticons/<#EMO_DIR#>/sleep.gif" style="vertical-align:middle" emoid="-_-" border="0" alt="sleep.gif" /> <br />相信在Maxthon 也会发生这样的事情 不过没有办法实验 因为没有安装。。<!--QuoteEnd--></div><!--QuoteEEnd--><br />绝对不工作,我以前测试过<br /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />不工作是你将Maxthon的在地址栏输入地址再回车的时候是在新标签中打开, 你可以尝试将Maxthon设置 在地址栏输入地址回车在本窗口打开, 一样可以看得到, 即使是Firefox, 设置在本窗口(标签)打开, 也可以看到明显的图片移位!! (估计是代码行setInteval()没有工作)
cuthead 发表于 2007-2-6 02:16
<!--quoteo(post=78084:date=2007年2月6日 12:04 AM:name=凯杰)--><div class='quotetop'>引用 (凯杰 @ 2007年2月6日 12:04 AM) <a href="index.php?act=findpost&pid=78084"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=78030:date=2007年2月5日 5:32 PM:name=cuthead)--><div class='quotetop'>引用 (cuthead @ 2007年2月5日 5:32 PM) <a href="index.php?act=findpost&pid=78030"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=77998:date=2007年2月5日 2:35 PM:name=Flashere)--><div class='quotetop'>引用 (Flashere @ 2007年2月5日 2:35 PM) <a href="index.php?act=findpost&pid=77998"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->有意思。。<br /> <img src="http://forums.mozine.cn/style_emoticons/<#EMO_DIR#>/sleep.gif" style="vertical-align:middle" emoid="-_-" border="0" alt="sleep.gif" /> <br />相信在Maxthon 也会发生这样的事情 不过没有办法实验 因为没有安装。。<!--QuoteEnd--></div><!--QuoteEEnd--><br />绝对不工作,我以前测试过<br /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />不工作是你将Maxthon的在地址栏输入地址再回车的时候是在新标签中打开, 你可以尝试将Maxthon设置 在地址栏输入地址回车在本窗口打开, 一样可以看得到, 即使是Firefox, 设置在本窗口(标签)打开, 也可以看到明显的图片移位!! (估计是代码行setInteval()没有工作)<br /><!--QuoteEnd--></div><!--QuoteEEnd--><br />sorry,我从未真正用过Maxthon(厌恶它),现Maxthon测试有效。
凯杰 发表于 2007-2-6 10:46
我也没有用过Maxthon...不过理论上是那样子.
勒色cherio2002 发表于 2007-3-8 19:19
IE7下不工作!<br /><br />很老的帖子了
InuYasha 发表于 2007-3-9 11:07
那段代码有问题<br />正确的是<br />java script: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); <br /><br />Firefox和IE7都可以用
有什么 发表于 2007-8-7 17:08
IE 7下,无效!<br /><br />好像这个东西,没有使用价值哦!
永一吧 发表于 2007-8-13 21:47
试过一次,无反应,有种被骗的感觉 <img src="http://forums.mozine.cn/style_emoticons/<#EMO_DIR#>/sweatingbullets.gif" style="vertical-align:middle" emoid=":sweatingbullets:" border="0" alt="sweatingbullets.gif" />
CoffeeCat 发表于 2007-8-16 20:33
以前试过,确实是可以的,如果楼主给的代码不能运行,那是代码的问题。这个不是Bug,Firefox也是运行的,只要代码正确无误,而且要符合Web标准。<br />你在地址栏中输入最简单的javascript代码测试:<br /><!--c1--><div class='codetop'>代码</div><div class='codemain'><!--ec1-->java script:alert("hello!");<!--c2--></div><!--ec2--><br />看看浏览器有没有反应<br /><br /><br /><!--fonto:Arial Black--><span style="font-family:Arial Black"><!--/fonto--><!--coloro:#ff0000--><span style="color:#ff0000"><!--/coloro-->注意:java script中间无空格,不知道为什么,论坛的code会自动在javascript中加空格...<!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc-->
页:
[1]