High School Math

MISSION STATEMENT: To encourage and promote a greater use of the internet and computer technology in the math classroom. For educators, students, parents and homeschoolers.

Saturday, March 14, 2009

Garfield Comics



About a year ago, a nice teacher in our Google Group sent us this short program. It shows a different random Garfield Comic Strip each time the page is refreshed.
He put these comics on the classroom walls, on tests, on lesson overheads, and even had Garfield marathon-chuckle-fests to fill in some extra time. He also put them on his school website to add some color and humor. Use your imagination.

Simply Copy & Paste the code between the dotted lines below, into Notepad or Wordpad and save it on your own laptop as Garfield.html. Then just click on this file and allow your laptop to run Javascript.
Or Copy & Paste this program snippet into your webpage source code where you want the comic strip to appear. That's it. Have Fun!

........................................

<script language="Javascript">
var yy = Math.floor(Math.random()*16)+1992;
xx=yy.toString().substring(2);
var loc = "http://images.ucomics.com/comics/ga/"+yy+"/ga"+xx;
var mm = Math.floor(Math.random()*8)+1;
var dd = Math.floor(Math.random()*18)+10;
document.write("<img src='" + loc + "0"+mm+""+dd + ".gif" + "'>");
</script>

........................................

More Great Stuff at www.TheMathWebSite.com.