Create a function in the script block


Discuss the below:

Simple JavaScript Event

Instructions

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 :

Prepared by a verified Expert
JAVA Programming: Create a function in the script block
Reference No:- TGS01938350

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)