Explore BrainMass

Demonstration of HTML and simple javascript

Please see attached instructions. Thanks.

Simple JavaScript Event

Step 1: Using a text or HTML editor create a web page with the following content and formatting:
Put an image in the background of your page (make sure that it is a very faded image so that you can see text on top of it)
In header tags of decreasing size centered on the page:
o Name
o Course
o Lab

Step 2: In the head section of your document, put a JavaScript block that properly comments out the code from older browsers. Create a function in the script block called MyLoadFunction. Make the function call the alert() method and include the message "Welcome to my Lab 5!".

Step 3: Modify the body tag of your page to include the onLoad event handler. Within the event handler call the MyLoadFunction().

Step 4: Save the web page in two different formats: Once as a text document that you entitle lab5xx.txt and again as lab5xx.htm.


Solution Preview

The posting requires understanding of a few HTML and Javascript concepts. For HTML we are asked to create a basic page that contains a background image and three centered headings.

The background image is created by adding the "background" attribute to the "body" tag. The value of the "background" tag is the name of the file that will be the background ...

Solution Summary

This solution demonstrates how to create a simple HTML file that contains three headings and an image. It also shows a javascript function that runs on the page load.