| Welcome to The Gang of Five | The Land Before Time. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Fun with Javascript! | |
|---|---|
| Tweet Topic Started: Jun 22 2009, 06:20:43 PM (243 Views) | |
| pokeplayer984 | Jun 22 2009, 06:20:43 PM Post #1 |
|
Yes, that's a new Pokemon!
|
Here's a couple of fun things a friend of mine at another board showed me. Put the following into your web address URL bar and watch the fun: 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); Also try this one: 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) Note: Please make sure you have the latest Java updates before putting them in. Note 2: To fix this, just hit the Back button, and you'll be fine. |
![]() |
|
| Alex | Jun 22 2009, 09:06:22 PM Post #2 |
![]()
Look up for assorted pro-Ducky avatars.
|
I usually can't stand java, but that was kinda cool
|
![]() |
|
| landbeforetimelover | Jun 22 2009, 10:46:19 PM Post #3 |
![]()
Littlefoot
|
You have to make sure the scripts will work properly with browsers. Neither of them work with Firefox.
|
![]() |
|
| pokeplayer984 | Jun 22 2009, 11:08:36 PM Post #4 |
|
Yes, that's a new Pokemon!
|
I beg to differ as I tested them out with Firefox myself and they worked for me.
|
![]() |
|
| landbeforetimelover | Jun 23 2009, 12:20:37 AM Post #5 |
![]()
Littlefoot
|
Oh. I see now. Sorry. I was on a very small resolution and didn't copy the whole code. Now I'm on my master machine and all works well. Pretty cool.....but IE wouldn't handle a script like this very well.
|
![]() |
|
| pokeplayer984 | Jun 23 2009, 12:55:20 AM Post #6 |
|
Yes, that's a new Pokemon!
|
I'm not willing to test it myself, but if anything, I bet it would crash!
|
![]() |
|
| landbeforetimelover | Jun 23 2009, 02:02:30 AM Post #7 |
![]()
Littlefoot
|
No. It just blocks EVERYTHING. It won't even allow a Javascript popup window. Just stupid. ALL other browsers allow it just fine, but IE identifies it as a "security risk". :rolleyes: I can't imagine what it would say to something like this. You'd probably have to disable all security in order to get it to work. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Computer and Electronics · Next Topic » |








7:37 PM Jul 10