Answered step by step
Verified Expert Solution
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 Programming with JavaScript Complete the following: Use your text editor to open mpltxthtm from the tutorial. 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 mplhtm in the same folder. In the head section, just above the closing tag, insert a script element that accesses the code in the randomjs file. Add an embedded script element for the code that you'll add to the mphtm file. Within the embedded script element, create a function named showimg 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 showimg function displays a random image from the png through 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 as the value of the size parameter in the randominteger function. c After the statement that creates the imgNumber variable append the following singleline comment: Return a random number from to d Insert a command that writes the text to the document, where imgumber is the value of the imgNumber variable. 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. Within the script element, call the showIng function five times. You do not need to specify a parameter value, Save your changes to the file. Open mphtm 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 Submit your completed files to your instructor Case Problem Data Files needed for the Case Problem: datetime.js mask.gif, modernizris skyjpg skyjpg skymaptxt.htm skyweb.css skyweb.jpg ine
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started