Search
Sponsors

Todays Date

September 30th, 2009

 

<!– Copy this code into the BODY section –>

<SCRIPT LANGUAGE="JavaScript1.2">

<!– Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
// End –>
</SCRIPT>
</CENTER>

Area Calculator

September 30th, 2009

<!– Paste this into the HEAD of your HTML document –>

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!– Original: Michael Hundt (mchundt@nglic.com) –>
<!– Web Site: http://www.cinet.net/~mhundt/mystuff.htm –>

<! >
<! >

<!– Begin
function doArea(num) {
switch(num) {
case 0 : return (""); break;
case 1 : var length = prompt("Please enter the length of your square:", "");
length = length * length;
return (length); break;
case 2 : var width = prompt("Please enter the width of the base:", "");
var height = prompt("Please enter the height of the triangle:", "");
return (width * height / 2); break;
case 3 : var width = prompt("Please enter the width of your rectangle:", "");
var height = prompt("Please enter the height of your rectangle:", "");
return (width * height); break;
case 4 : var radius = prompt("Please enter the radius of the circle: ", "");
return (Math.PI * Math.pow(radius, 2)); break;
case 5 : var radius = prompt("Please enter the radious of the sphere:", 0);
return (4 * Math.PI * (Math.pow(radius, 2))); break;
}
}
// End –>
</script>
</HEAD>

<!– Copy this into the BODY of your HTML document –>

<center>
<form name=calcarea>
Find the area of a
<select name="shape" size="1" onChange="this.form.area.value = doArea(this.selectedIndex);">
<option> …
<option value="square">Square
<option value="triangle">Triangle
<option value="rectangle">Rectangle
<option value="circle">Circle
<option value="sphere">Sphere
</select>
= <input type=text name=area size=10>
</form>
</center>

Temperature Conversion

September 24th, 2009
   1:  <!-- STEP ONE: Copy this code into the BODY of your HTML document -->
   2:   
   3:  Enter a number in either field, then click outside the text box.
   4:   
   5:  <form>
   6:  F: 
   7:  <input type="text" name="F" value="32" 
   8:  onChange="C.value = 100/(212-32) * (this.value - 32 )"><br>
   9:  C: 
  10:  <input type="text" name="C" value="0" 
  11:  onChange="F.value = (212-32)/100 * this.value + 32 "><br>
  12:  </form>

Title bar clock

September 24th, 2009
   1:  <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
   2:   
   3:  <HEAD>
   4:  <SCRIPT LANGUAGE="JavaScript">
   5:  <!-- Original: Massimo Giari (motore@iol.it) -->
   6:  <! >
   7:  <! >
   8:  <!-- Begin
   9:  var clocktext, timeday;
  10:  var pagetitle = document.title;
  11:  function scroll() {
  12:  today = new Date();
  13:  sec = today.getSeconds();
  14:  hr = today.getHours();
  15:  min = today.getMinutes();
  16:  // 12 Hour clock fix by Michael Mann (pres@manninc.com)
  17:  if (hr < 12) { timeday = " AM"; }
  18:  else { timeday = " PM"; }
  19:  if (hr > 12) hr = hr - 12;
  20:  if (hr <= 9) hr = "0" + hr;
  21:  if (min <= 9) min = "0" + min;
  22:  if (sec <= 9) sec = "0" + sec;
  23:  var clocktext = " - " + hr + ":" + min + ":" + sec + timeday;
  24:  clocktimer = setTimeout("scroll()", 1000);
  25:  document.title = pagetitle + clocktext;
  26:  }
  27:  if (document.all) scroll();
  28:  // End -->
  29:  </script>

Status Bar Clock

September 24th, 2009
   1:  <!-- STEP ONE: Put this code into the HEAD of your HTML document --> 
   2:   
   3:  <HEAD>
   4:  <SCRIPT LANGUAGE="JavaScript">
   5:  <!-- Original: Francis Woodhouse (francis@contessa.u-net.com) -->
   6:  <! >
   7:  <! >
   8:  <!-- Begin
   9:  function runClock() {
  10:  theTime = window.setTimeout("runClock()", 1000);
  11:  var today = new Date();
  12:  var display= today.toLocaleString();
  13:  status=display;
  14:  }
  15:  // End -->
  16:  </SCRIPT>
  17:   
  18:  <!-- STEP TWO: Put this code onLoad event handler in the BODY tag -->
  19:   
  20:  <body onLoad="runClock()">
Translate