Forum Index  »  Geek Chat  »  Fun with JavaScript
 Post new topic   Reply to topic
Page 1 of 1    

Fun with JavaScript

Author Message
davedim
Posted: Apr 19, 2007 8:21 pm Reply with quote
フレンジャー フレンジャー
Joined: 24 Oct 2006 Posts: 935
Code:
JavaScript: 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.getElementsByTagName(%22img%22); 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)+%22px%22; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+%22px%22}R++} setInterval('A()',5);void(0)

Copy and paste that into your address bar.

It works with Internet Explorer and Firefox.

I'll post more fun codes later.

Anyone else skilled in programming can contribute too.Tongue
 
AnimeDad
Posted: Apr 19, 2007 8:28 pm Reply with quote
Happy Days Happy Days
Joined: 28 Feb 2007 Posts: 115 Location: Australia
That's bizarre! Good one dave Smile
 
davedim
Posted: Apr 19, 2007 8:39 pm Reply with quote
フレンジャー フレンジャー
Joined: 24 Oct 2006 Posts: 935
Code:
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 = "P= emosewa si midevad lol"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse

Another one! Giggle
 
.::carlito::.
Posted: Apr 20, 2007 1:03 am Reply with quote
クラゲ, 流れ星 クラゲ, 流れ星
Joined: 14 Oct 2006 Posts: 3609 Location: Melbourne, Australia
^
Haha, what's up dave? I haven't spoken to you in a while! Hmmm what exactly do these JavaScripts do?? Confused
 
mangomalte
Posted: Apr 20, 2007 2:19 am Reply with quote
クラゲ, 流れ星 クラゲ, 流れ星
Joined: 10 Oct 2006 Posts: 3587 Location: Sweden
wow. Smile that was cool. i haven't been doing stuff in javascript, but i know how to write programs in java. going to write some stuff in c now too, a list with different functions. but that's just for school, i haven't done much on my free time. maybe i should check this out. Smile

P= emosewa si midevad lol - that was fun Giggle

@carlito: just do what he says, and you'll find out. Wink
 
davedim
Posted: Apr 20, 2007 6:58 am Reply with quote
フレンジャー フレンジャー
Joined: 24 Oct 2006 Posts: 935
Code:
javascript: x=0; e=document.body;e.style.position = "absolute"; function rt() {e.style.top = 100 - (50 * Math.cos(x * Math.PI/180)) + "px"; e.style.left = 100 + (50 * Math.sin(x*Math.PI/180)) + "px"; x+=5}; setInterval("rt()",50); void(0);

This is what happens when I have too much time on my hands. Giggle

Oh, and JavaScript is incredibly easy compared to Java.

I studied Computer Games Development last year and Java, C++ and Pascal gave me headaches.
 
michael90
Posted: Apr 20, 2007 7:30 am Reply with quote
ネコに風船 ネコに風船
Joined: 06 Nov 2005 Posts: 504 Location: Singapore
wow awesomely cool davedim.
how does all this codes works?
 
mangomalte
Posted: Apr 20, 2007 7:52 am Reply with quote
クラゲ, 流れ星 クラゲ, 流れ星
Joined: 10 Oct 2006 Posts: 3587 Location: Sweden
hehe, the last one gives a kinda drunk feeling. Tongue
yeah, this c stuff is killing me. all the pointers and memory allocations... java works better for me. looks like you don't have to write that much in javascript. i like that. but i don't really have the time to check it out just yet.

edit: wow. i just noticed that this was my 500th post. Tongue
 
Eugeniu
Posted: May 24, 2007 3:41 pm Reply with quote
Happy Days Happy Days
Joined: 23 May 2007 Posts: 113
These aren't very new, I've seen them before like um...I think it was a year ago Shocked
 
hiro
Posted: Oct 14, 2007 6:14 am Reply with quote
ネコに風船 ネコに風船
Joined: 10 Oct 2007 Posts: 502
Code:
javascript:var x=document.getElementById('top_image');x.childNodes[1].childNodes[0].style.width='200px'; x.childNodes[1].childNodes[0].style.height='auto';x.style.position='fixed';function M(e){x.style.left=(e.clientX+10)+'px';x.style.top=(e.clientY+10)+'px';} window.onmousemove=function(e){M(e);};void(0)

here's one that i made!
move your mouse around the window Giggle
if you're using Internet Explorer, you'll have to scroll up to the top of the page to see it. Sneeze


comment by eyn: This only works with themes based on NoseBleed, not NB2 though
 
Post new topic   Reply to topic
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Dec 19, 2018 5:41 am
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum