Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

nd CSS Tutorial 1 0 Programming with JavaScript Complete the following: 1 . Use your text editor to open mpl 2 txt . htm from

nd CSS Tutorial 10 Programming with JavaScript Complete the following: 1. Use your text editor to open mpl2txt.htm from the tutorial. 10 review folder included with your Data Files. Enter your name and the date in the comment section of the file and save the file as mpl2.htm in the same folder. 2. In the head section, just above the closing tag, insert a script element that accesses the code in the randomjs file. 3. Add an embedded script element for the code that you'll add to the mp|2.htm file. 4. Within the embedded script element, create a function named showimg0. The pur pose of this function is to write an inline image tag into the current document. The function has no parameters. Add the following statements to the function: a. Add the following multiline comment to the start of the function, just below the opening showing () function statement: The showimg0 function displays a random image from the 0.png through 9.png files. The random image is designed to thwart hackers attempting to enter the library records database by requiring visual confirmation. b. Declare a variable named imgNumber equal to the value returned by the randominteger) function. Use 9 as the value of the size parameter in the randominteger() function. c. After the statement that creates the imgNumber variable append the following single-line comment: Return a random number from 0 to 9. d. Insert a command that writes the text to the document, where imgumber is the value of the imgNumber variable. 5. Scroll down to the bottom of the file and locate the last table cell in the document, Within this empty table cell, insert a seript element. 6. Within the script element, call the showIng() function five times. You do not need to specify a parameter value, 17. Save your changes to the file. 8. Open mp2.htm in your web browser. Verify that each time you refresh the Web page, a different sequence of five image numbers appears at the bottom of the Web form. Debug your code as necessary using any of the tools or techniques described in this tutorial 9. Submit your completed files to your instructor Case Problem 1 Data Files needed for the Case Problem: datetime.js, mask.gif, modernizr-1.5.is, sky0.jpg - sky23.jpg, skymaptxt.htm, skyweb.css, skyweb.jpg ine

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

IBM Db2 11 1 Certification Guide Explore Techniques To Master Database Programming And Administration Tasks In IBM Db2

Authors: Mohankumar Saraswatipura ,Robert Collins

1st Edition

1788626915, 978-1788626910

More Books

Students also viewed these Databases questions

Question

1. What are the pros and cons of diversity for an organisation?

Answered: 1 week ago

Question

1. Explain the concept of diversity and equality in the workplace.

Answered: 1 week ago