Funny Javascript
-
It did something. maybe. cuz of HTML text... You may download the txt file from this link http://michaelsync.net/2007/02/28/fun-playing-with-javascript/ let me know if it doesn't work.
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
I tried them all in all browsers and nothing happens
"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean." Tom Welch
-
I tried them all in all browsers and nothing happens
"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean." Tom Welch
Have you downloaded the txt file? If you haven't, please download the txt file. You can check the comments in that post. The script works for those commenter when they download the txt file. I think that copying code from post make some problems. It should work on either firefox or IE6/7. Please try again. Hope it works. :)
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
Well none of these did anything in either IE or FireFox, what was I supposed to see?
"Let's face it, the average computer user has the brain of a Spider Monkey." Bill Gates
Turn on firebug and you will see it's doing a lot... errors. :)
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
-
Fun #1: 1. Go to any website (eg: Google Personalized HomePage) 2. Delete everything in the address bar 3. paste the following code in the address bar: 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); 4. Press enter and have fun! :) Thanks to Grim. Fun #2: 1. Go to Google Classic Homepage (*NOT Personalized Home.*)) 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:i=100;void(setInterval("i++;document.images[1].width=i",5),setInterval("i++;document.images[1].height=i",5),setInterval("i++;document.images[2].width=i",5),setInterval("i++;document.images[2].height=i",5),setInterval("i++;document.images[3].width=i",5),setInterval("i++;document.images[3].height=i",5),setInterval("i++;document.images[4].width=i",5) ,setInterval("i++;document.images[4].height=i",5) ) 4. Press Enter Thanks to Harpreet and Philip(Ye Maung). Fun #3: 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function flood(n) {if (self.moveBy) {for (i = 15; i > 0;i–){for (j = n; j > 0; j–){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }}flood(6);{ var inp = "MIKE morf ,ecnavda ni RAEY WEN YPPAH ,iH"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse 4. Press Enter Thanks to the author of this post. Fun #4: last but not least :) 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function reverse() { var inp = " )-: krow ru no yrrac ko.mih morf nraeL .seod CNYS LEAHCIM ekil krow lufesu emos oD .esnesnon siht lla gniod rof uoy gniyap ton si ynapmoC"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse() 4. Press Enter Source Download : [Funny] Playing with Javascript
Thanks and Regards, Michael Sync ( Blog:
I'm sorry, but how does this fit into the Coding Horrors section? Have you encountered these items in development/production? They just seem to be "amusing" things to do with JavaScript.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
-
I'm sorry, but how does this fit into the Coding Horrors section? Have you encountered these items in development/production? They just seem to be "amusing" things to do with JavaScript.
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
I think it's clear that Michael Sync is a Coding Horror!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
-
I think it's clear that Michael Sync is a Coding Horror!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
:laugh:
Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.
-
I think it's clear that Michael Sync is a Coding Horror!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
>>I think it's clear that Michael Sync is a Coding Horror! :) >>Turn on firebug and you will see it's doing a lot... errors. this is code horror..
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
I think it's clear that Michael Sync is a Coding Horror!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
yep very true :)
Regards, Sylvester G
-
I think it's clear that Michael Sync is a Coding Horror!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
:laugh::laugh:
Regards, Satips.:rose: Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Walk beside me, and just be my friend. - Albert Camus
-
Fun #1: 1. Go to any website (eg: Google Personalized HomePage) 2. Delete everything in the address bar 3. paste the following code in the address bar: 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); 4. Press enter and have fun! :) Thanks to Grim. Fun #2: 1. Go to Google Classic Homepage (*NOT Personalized Home.*)) 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:i=100;void(setInterval("i++;document.images[1].width=i",5),setInterval("i++;document.images[1].height=i",5),setInterval("i++;document.images[2].width=i",5),setInterval("i++;document.images[2].height=i",5),setInterval("i++;document.images[3].width=i",5),setInterval("i++;document.images[3].height=i",5),setInterval("i++;document.images[4].width=i",5) ,setInterval("i++;document.images[4].height=i",5) ) 4. Press Enter Thanks to Harpreet and Philip(Ye Maung). Fun #3: 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function flood(n) {if (self.moveBy) {for (i = 15; i > 0;i–){for (j = n; j > 0; j–){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }}flood(6);{ var inp = "MIKE morf ,ecnavda ni RAEY WEN YPPAH ,iH"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse 4. Press Enter Thanks to the author of this post. Fun #4: last but not least :) 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function reverse() { var inp = " )-: krow ru no yrrac ko.mih morf nraeL .seod CNYS LEAHCIM ekil krow lufesu emos oD .esnesnon siht lla gniod rof uoy gniyap ton si ynapmoC"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse() 4. Press Enter Source Download : [Funny] Playing with Javascript
Thanks and Regards, Michael Sync ( Blog:
First one: 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); It gave errors on DIS.position=’absolute’ and setInterval(’A()’,5) Because ’ != '
-
Fun #1: 1. Go to any website (eg: Google Personalized HomePage) 2. Delete everything in the address bar 3. paste the following code in the address bar: 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); 4. Press enter and have fun! :) Thanks to Grim. Fun #2: 1. Go to Google Classic Homepage (*NOT Personalized Home.*)) 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:i=100;void(setInterval("i++;document.images[1].width=i",5),setInterval("i++;document.images[1].height=i",5),setInterval("i++;document.images[2].width=i",5),setInterval("i++;document.images[2].height=i",5),setInterval("i++;document.images[3].width=i",5),setInterval("i++;document.images[3].height=i",5),setInterval("i++;document.images[4].width=i",5) ,setInterval("i++;document.images[4].height=i",5) ) 4. Press Enter Thanks to Harpreet and Philip(Ye Maung). Fun #3: 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function flood(n) {if (self.moveBy) {for (i = 15; i > 0;i–){for (j = n; j > 0; j–){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }}flood(6);{ var inp = "MIKE morf ,ecnavda ni RAEY WEN YPPAH ,iH"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse 4. Press Enter Thanks to the author of this post. Fun #4: last but not least :) 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function reverse() { var inp = " )-: krow ru no yrrac ko.mih morf nraeL .seod CNYS LEAHCIM ekil krow lufesu emos oD .esnesnon siht lla gniod rof uoy gniyap ton si ynapmoC"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse() 4. Press Enter Source Download : [Funny] Playing with Javascript
Thanks and Regards, Michael Sync ( Blog: