Writing for the World Wide Web | |
Home Course Information Assignments Schedule Class Notes Resources Student Pages |
Class Notes
Planning Site Navigation Organizing WWW Files Using Webpage Editors Upload / Download (FTP) Visual Design Appropriate Use of Technology Unix Commands Cascading Style Sheets JavaScript |
Personalized Greeting
Well, , let's face it: the internet is a pretty big place, and sometimes it can seem a little unfriendly. Am I right, ? Yeah, I thought so. Well, there are ways you can personalize webpages a bit so people don't feel so alienated by the vastness of the internet. Pay attention, , because this script is a little trickier. First, you need to find out what the person's name is, and you have to do this before your webpage loads. Until now, the head of the HTML document has been for titles only. Placing a JavaScript function in the head of your document will make it run before your webpage loads; this way, you can get information from your user to actually display in your webpage. Now we're going to add a script into the head of our HTML document so our head will look like this:
Here is a basic breakdown of what each part means:
And you saw what the effects of this script were when you loaded this page. Hope you enjoy this one, ... |