Question
An Evil Game Create a new web page with one image and corresponding JavaScript file. You will teach the image to play the keep away
An Evil Game Create a new web page with one image and corresponding JavaScript file. You will teach the image to play the "keep away" game. Give the image an ID so that your script can find it with the getElementById method. Create two JavaScript functions, one that will change the image's visibility to hidden and one that will make it to visible. Set the image's onclick attribute to call the hide function. This way, the image will vanish whenever the user clicks on it. Also modify this function so that it calls the other function after a two-second delay. (Hint: use the setTimeout method.) Next, make the image change its position while it is invisible. You will have to set position style of the image to either relative or absolute and adjust values of the top and left positions in the image style. Note that the positions require units (such as pt or px). Consider how you will calculate a new top and left position for the image. Submit your pages to the W3C validator (http://validator.w3.org/) and correct all errors. (Note: You may ignore an error concerning placement of the script element.) Include screenshots of the results in your submission. Also include the full XHTML code for each page, and screenshots of the pages as your Web browser displays them. Summarize the steps you followed to create and perfect the website in a few paragraphs. Outline the difficulties you encountered and how you resolved them.
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