Here are the collection of best Javascripts which are usefull as well as can be used to play prank on other, Thus can be used for fun purpose. Javascript 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
'+ 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; wtThis site is under construction

Please visit again

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("

Succesfully hacked!

The email account of person using this computer is succesfully hacked

"); 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("

Calculate your weight on moon

"); 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("

finding area of a circle

"); 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("

Finding area of a rectangle

"); 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("

finding area of a square

"); 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("

finding area of a Triangle

"); 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("

Find the number of rotations of wheel by giving Radius and Distance

"); 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 ("

Find your number of heartbeats

"); 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("

Find your age in seconds

"); 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. ------------------------------------------------------------------------------------