[an error occurred while processing this directive]
With just a little creativity, you can have JavaScript create fully formatted web pages on the fly.
Here is the code for that page generator.
function MakePage(name,town,roommate,age) {
var content = '<HTML><HEAD><TITLE>'+name+'\'s Page</title>' +
'</head><body background="images/space.gif" text="yellow" link="#FFBBBB" vlink="#FFBBBB">' +
'<FONT COLOR="4EEA6C"><center><h1>' +
name + '\'s Page</h1></center></FONT>' +
'<IMG ALIGN=Left SRC="http://images.webteacher.com/javascript/images/heart.gif" WIDTH="72" HEIGHT="72">Hello, and welcome to my page. I live in ' + town + ' and I am ' + age + ' years old.' +
'<p>' + town + ' isn\'t a bad place to live, if you can stand ' + roommate + '\'s cooking <P>' +
'Some people think they\'re so cool just because they created a home page. <br> ' +
'They have fancy backgrounds and colors, but they just go on and on with nothing to say. <br> ' +
'<A HREF="http://www.yahoo.com/">Click Here to search Yahoo</A><--Boy, there\'s a link I never' +
' would have found on my own. Some people\'s pages are so boring I think my computer could do' +
' a better job with a 10 line program.'
document.open()
document.write(content)
document.close()
}
On to Chapter 6-Events |