Posts

DIFFERENT BUTTONS

copy this code save as .html <html> <head> <title> buttons</title> <style type="text/css">  #one{color: red; font-weight: bold}  #two{color: darkgreen; font-weight: bold; background-image: url(C:\Users\Public\Pictures\Sample Pictures\forest.jpeg); width:200; height:150}  #three{color: firebrick; background-color: ivory; border-color: firebrick; font-family: chiller}  #four{color: white; background-color: blue; border-color: yellow; border-style: groove; border-width:10; width:200}  #five{text-decoration: underline; background-color: green; color: lime} </style> </head> <body> <!--form 1--> <form name="form1">  <!--button 1-->  <input id="One" type=button name="button1" value="push me">  <!--button 2-->  <input id="Two" type=button name="button1" value="push me">  <!--button 3-->  <input id

special style

copy this code save as .html <!-- this script got from www.javascriptfreecode.com coded by: Krishna Eydat--> <SCRIPT LANGUAGE="JavaScript"> var awEMnbSPm; var AWEmnbSPm;var aWEMnbSPm; var AWEMnbSPm;var awemnbsPM; var AwemnbsPM;var aWemnbsPM; var awEmnbsPM; var aweMnbsPM;var AWemnbsPM; var aWEmnbsPM; var awEMnbsPM; AWEmnbsPM("HAI THIS IS MOTHI","arial,helvetica,times new roman",5,"red",4,1,2,30,5,2,200,200,"DFJO1AC439CXM4FIF5FD94G"); var aWEMnbsPM=document.layers; var AWEMnbsPM=document.getElementById&&!document.all;var AwemNBSpm=document.getElementById&&document.all; var awEMnbSPm=awEMnbSPm.split(''); var aWemNBSpm=awEMnbSPm.length; var awEmNBSpm=aWEMnbSPm*10; var AWemnBSPm="This script was made by Krishna.Eyd (C)2008 All rights reserved. Visit www.htmlfreecode.com for more free scripts!"; var aWEmnBSPm=0; var awEMnBSPm="<font face="+AWEmnbSPm+" siz

DATE AND TIME

copy this code save as .html <html> <head> <script Language="JavaScript"> <!-- hide var timeStr, dateStr; function clock() { now= new Date(); // time alert(now); hours= now.getHours(); minutes= now.getMinutes(); seconds= now.getSeconds(); timeStr= "" + hours; timeStr+= ((minutes < 10) ? ":0" : ":") + minutes; timeStr+= ((seconds < 10) ? ":0" : ":") + seconds; window.status="Now the time is"+timeStr; document.clock.time.value = timeStr; // date date= now.getDate(); month= now.getMonth()+1; year= now.getFullYear(); dateStr= "" + month; dateStr+= ((date < 10) ? "-0" : "-") + date; dateStr+= "-" + year; document.clock.date.value = dateStr; Timer= setTimeout("clock()",2000); } // --> </script> </head> <body onLoad="clock()"> <form name="clock"> Time: <input

Display Window

copy the code save as .html <html> <head> <script language="JavaScript"> <!-- hide function openWin2() { myWin= open("http://www.facebook.com", "c", "width=400,height=300,status=no,toolbar=no,menubar=no"); } // --> </script> </head> <body> <form> <input type="button" value="Open new window" onClick="openWin2()"> </form> </body> </html>

LINKS

copy the code save as .html <HTML> <HEAD> <TITLE>Listing 11-13</TITLE> <STYLE>   A:link {text-decoration: none}   A:hover {color: red; text-decoration: underline;font-size:20}   A:visited {color: green; text-decoration: underline} </STYLE> </HEAD> <BODY> <A HREF="http://www.facebook.com">www.facebook.com</A><BR> <A HREF="http://www.gmail.com">www.gmail.com</A><BR> <A HREF="http://www.google.com">www.google.com</A><BR> <A HREF="http://www.pvpsiddhartha.ac.in">www.pvpsiddhartha.ac.in</A><BR> </BODY> </HTML>

BACKGROUND COLORS

copy the code save as .html <html> <body> <center> [<a href="/" onMouseOver="document.bgColor='Green'">GREEN</a>]&nbsp;&nbsp; [<a href="/" onMouseOver="document.bgColor='Red'">RED</a>]&nbsp;&nbsp; [<a href="/" onMouseOver="document.bgColor='orange'">orange</a>]&nbsp;&nbsp; [<a href="/" onMouseOver="document.bgColor='green'">brightgreen</a>]&nbsp;&nbsp; [<a href="/" onMouseOver="document.bgColor='seagreen'">seagreen</a>]&nbsp;&nbsp; </center> </body> </html>

RANDOM

copy the code save as .html <html> <head> <title> J Script </title> <script language="javascript"> var value; document.writeln("<body bgcolor=cyan>"); document.writeln("<table cellpadding=20 border=1 align=center> "); document.writeln("<caption><b>Refresh this page</b></caption><br><br><tr>"); for(var i=1;i<=9;i++) {                    value=Math.ceil(Math.random()*10); document.writeln("<td align=center>"+value+"</td>"); if(i%3==0 ) document.writeln("</tr><tr>"); } document.writeln("</tr></table>"); document.writeln("</body>"); </script> </head> </html>