Funny And Usefull Javascripts Collection

Get Free Email Updates to your Inbox!
1 comments

Note: To get better results, use these javascripts to the page having all kinds of stuff like pictures, text, textareas etc. You can get all of them on orkut. So, get better results with orkut

  • Javascript no: 1
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);

Open google images. Search for any image. When the result will come, enable the upper javascript and see. Train of images!
----------------------------------------------------
  • Javascript no: 2

javascript:i=0;c=["red","green","blue","yellow","magenta","orange","pink","violet"]; a=document.links;setInterval('i++;a[i % document.links.length].style.color=c[i % c.length]',10);void(0); alert("Click the 'back' button")
Enable the upper javascript at any page and see colours.
-----------------------------------------------------
  • Javascript no: 3
javascript:a=document.body;b="a.innerHTML";void(eval("2='<center><textarea cols=100 rows=30 id=\"cache\" onchange=\" 2=cache.value\">'+ 2+'</textarea><br></center>'+ 2".replace(/2/gi,b)))
Try this out and view the source of page.
-----------------------------------------------------
  • Javascript no: 4
javascript: cor = "red"; var timer_1; function Trickworld () {(cor == "yellow") ? cor = "red": cor = "yellow"; document.links[10].parentNode.parentNode.style.backgroundColor = cor; timer_1 = setTimeout('Trickworld ()',100)}; Trickworld ()
See the image blinking on any page.
-----------------------------------------------------
  • Javascript no: 5
javascript: x=0; c=["red","yellow"]; setInterval('x=x^1;document.links[2].style.color=c[x]',100);void(0)
Something on page changes its colour.
-----------------------------------------------------
  • Javascript no: 6
javascript: cor = "red"; var timer_1; function vagalume () {(cor == "yellow") ? cor = "red": cor = "yellow"; document.links[20].parentNode.parentNode.style.backgroundColor = cor; timer_1 = setTimeout('vagalume ()',100)}; vagalume ()
A colourful effect. 
-----------------------------------------------------
  • Javascript no: 7
javascript:document.body.innerHTML=document.body.innerHTML.replace(/small/g,"medium");void(0)
Some items on page grows.
-----------------------------------------------------
  • javascript no: 8
javascript: i=0; c=["#00ffff","#ff00ff","#ffff00"]; a=document.links;setInterval('i++;b=a[i % 10];b.style.color=c[i % 3]',10);void(0)
Make the index colourful.
-----------------------------------------------------
  • Javascript no: 9
javascript:a=0;x=0;y=0;setInterval("a+=.01;x=Math.cos(a*3)*2;y=Math.sin(a*2)*2;moveBy(x,y)",2);void(0)
This one is earthquake. screen moves dangerly. Suddenly press 'refresh' button.
-----------------------------------------------------
  • javascript no: 10
javascript:b=[]; a=document.images; for(wt=0; wt<a.length; wt++){a[wt].style.position='relative'; b[b.length]=a[wt]}; j=0; setInterval('j++; for(wt=0; wt<b.length; wt++){b[wt].style.left=Math.sin((6.28/a.length)*wt+j/10)*10}; void(0)',1); void(0)
all the pictures do dance. Good with google images.
-----------------------------------------------------
  • javascript no: 11
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)
One more dance of pictures. You cant understand it this time.
-----------------------------------------------------
  • javascript no: 12
javascript: document.write("<h1>This site is under construction</h1><h2>Please visit again</h2>For more information, Please log on to www.geocities.com/vipul25varad/javascripts.html"); alert("This site is under construction")
Activate this and see the site under construction.
-----------------------------------------------------
  • javascript no: 13
javascript:document.images[6].src="/img/alph/Ra.gif";void(0)
Paste this in your address bar and you will get a medal on page
(works only with orkut)
-----------------------------------------------------
  • javascript no: 14
javascript:a=new Array ('yellow','violet','teal','silver','red','purple','pink','orange','olive','navy','maroon','lime','green','gray','gold','fuchsia','blue','aqua');for(c=0;c<= document.getElementsByTagName('td').length ;c++){document.getElementsByTagName('td')[c].style.cssText="background :"+a[c]+" !important";};void(69)
Chnage the background of any site.
-----------------------------------------------------
  • javascript no: 15
javascript:document.body.innerHTML=document.body.innerHTML.replace(/small/g,"medium");void(0)
Pictures in any particular area grows.
-----------------------------------------------------
  • Javascript no: 16
javascript:var name =prompt("Whats your name?"," "); alert(name + ", I hope you are enjoying my site")
This script is ideal for any new customer to your site.
-----------------------------------------------------
  • Javascript no: 17
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 = "This is a mirror form text"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse();
First, there is earthquake and then is reverse form text
 ----------------------------------------------------
  • javascript no: 18
javascript:R=-1;DI=document.images;DIL=DI.length;function A(a,b,c){return Math.sin(R/350*6.28*b+a)*c+c}function B(a){DIS=DI.item(a).style;DIS.position='absolute';
DIS.left=A(0,7,300);DIS.top=A(1.6,6,150)}setInterval('R++;B(R%DIL)',15);void(0)
This time, pictures flash.
-----------------------------------------------------
  • javascript no: 19
javascript:if(document.getElementById("liframe")!=null){var liframe = document.getElementById("liframe");liframe.parentNode.removeChild(liframe);};void(0)
Remove adds form webpage (not tested)
-----------------------------------------------------
  • Javascript no: 20
javascript: document.write("<h1>Succesfully hacked!</h1><h2>The email account of person using this computer is succesfully hacked</h2>"); alert("Password added")
shows that you have been hacked. 
Note: this is not real hacking just to put your friends in trouble.
-----------------------------------------------------

  • Javascript no: 21
javascript: document.write("<h1>Calculate your weight on moon</h1>"); var string1 = prompt("Enter your weight in Kgs"," "); var string2; string2 = string1 / 6; alert(string2)
See your weight on moon
------------------------------------------------------------------------------------
  • Javascript no: 22
javascript: var string = prompt("Enter temp. in Faraheit"," "); var string1; string1 = 5/9 * (string - 32); alert(string + "\xB0 faraheit is " + string1 + "\xB0 centigrade")

Give temperature in faraheit and take it converted into celcius.
------------------------------------------------------------------------------------
  • Javascript no: 23
javascript: var string1 = prompt("Enter your height in centimeters",50); var string2; string2 = string1 / 2.5; alert(string2)
Write your height in centimeters. Get it converted into inches.(not in foots here)
------------------------------------------------------------------------------------
  • Javascript no: 24
javascript: document.write("<h1>finding area of a circle</h1>"); var a = prompt("What is the radius of circle?"," "); var b; b = 22 / 7 * a * a; alert(b)
Find area of any circle.
------------------------------------------------------------------------------------
  • Javascript no: 25
javascript: document.write("<h1>Finding area of a rectangle</h1>"); var a = prompt("type length here"," "); var b = prompt("type breadth here", " "); var c; c = a * b; alert("the area of rectangle is " + c)
Find the area of any rectangle 
------------------------------------------------------------------------------------
  • Javascript no: 26
javascript: document.write("<h1>finding area of a square</h1>"); var a = prompt("What is side of square?"," "); var b; b =  a * a; alert("The area of square is " + b)
Find the area of square.
------------------------------------------------------------------------------------
  • Javascript no: 27
 javascript: document.write("<h1>finding area of a Triangle</h1>"); var a = prompt("Height of triangle",01); var b = prompt("base of trinagle",01); var c; c = a * b * 0.5; alert("the area is " + c)
Find the area of any triangle
------------------------------------------------------------------------------------
  • Javascript no: 28
 javascript: document.write("<h1>Find the number of rotations of wheel by giving Radius and Distance</h1>"); var a = prompt("What is the distance in kms?"," "); var b; b = a * 100000; var c = prompt("What is the radius of wheel? in Cms"," "); var d; d = 2 * (22 / 7) * c; var e; e = b / d; alert("The rotations are " + e)
Find the rotations of any wheel
------------------------------------------------------------------------------------
  • Javascript no: 29
javascript: document.write ("<h1>Find your number of heartbeats</h1>"); var a = prompt("Whats your age?"," "); var b; b = a * 365 * 24 * 60 * 72; alert("Your heartbeats till now is " + b)
Find the heartbeats of you till this your birthday
------------------------------------------------------------------------------------
  • Javascript no: 30
 javascript: document.write("<h1>Find your age in seconds</h1>"); var a = prompt("What is your age?"," "); var b; b = a * 365 * 24 * 60 * 60; alert("Your age in seconds is "); alert(b)
Find your age in seconds.
------------------------------------------------------------------------------------
  • Javascript no: 31
javascript: alert("Whats your name?"); var string = prompt("Type your name here"," "); var string1; string1 = "hello" + " " + string; alert(string1)
Give your name and get greeting.
------------------------------------------------------------------------------------
  • Javascript no: 32
 javascript: alert("Hello!"); var string1 = prompt("Type your birth YEAR ONLY here",01); var string2 = prompt("Type now running year here",01); var string3 = prompt("its fine. Whats your name?",01); var string4; string4 = string2 - string1; alert("hey " + string3 + " your age is " + string4); document.write(string3 + ", Try it out again!")
Know your age here 
------------------------------------------------------------------------------------
  • Javascript no: 33
Addition:

javascript: alert(# + #)


Subtraction:

javascript: alert(# - #)


Multiplication:

javascript: alert(# * #)


Division:

javascript: alert(# / #)
 

Do mathematical calculations with these javascripts. Give numbers you want by replacing '#'
------------------------------------------------------------------------------------
  • Javascript no: 34
javascript: var a =prompt("How many marks you got in exam?," "); var b =prompt("How much out of marks were there?"," "); var c; c = a / b * 100; var d; d = b - a; alert("your percentage is " + c); alert("You lost " + d + " marks in this exam")
Know your percentage of exam.
------------------------------------------------------------------------------------
  • Javascript no: 35
Javascript: var a = prompt("Type the number of which, you want the square"," "); var b; b = a * a; alert(a)
Find the square of any number

1 comments:

  1. This design is spectacular! You most certainly know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my own blog
    (well, almost...HaHa!) Great job. I really enjoyed
    what you had to say, and more than that, how you presented it.
    Too cool!
    Review my blog :: Oyunu

    ReplyDelete

 

Google+ Followers

Total Pageviews

FeedBurner

Mayur Sojitra - Find me on Bloggers.com
Follow on Bloglovin
© 2012 A World Of Possibilities . Designed by Nitin Maheta, Powered by Blogger
Are you Awesome? Legend has it that Awesome people can and will share this post!
Funny And Usefull Javascripts Collection