Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Before attempting to work on this project: Download and Extract the Data Files - Chapter 0 2 js 0 2 project 0 3 folder in
Before attempting to work on this project:
Download and Extract the Data FilesChapter js project folder in your week module.
In this project, you will create an application that responds to the movements of the mouse over and out of a page object. The event that triggers the mouse over the object is called mouseover while moving the mouse out from an object triggers the mouseout event. In this application, you will display a different message depending on the shape the mouse is hovering over or no message at all if the mouse is hovering over no shape. Figure shows a preview of the page with the message for the mouse hovering over the circle.
HandsOn Project png
Do the following:
Use your code editor Such as: Notepad or the Text Editor within the "HandsonPractices" to open the projecttxthtml and projecttxtjs files from the js project folder. Enter your name and the date in the comment section of each file and save them as projecthtml and projectjs respectively.
Go to the projecthtml file in your code editor and in the head section add a script element to load the projectjs file, deferring the loading of the external script file until the entire page is loaded. Review the contents of the HTML file and note that the three shapes are placed within div elements with the ids squaretriangle and shape There is also an empty paragraph with the id feedback Save your changes to the file.
Go to the projectjs file in your code editor. Attach an onmouseover event handler to the element with the id square In response to the event run an anonymous function containing a statement that changes the innerHTML property of the element with the id feedback to the text string You re hovering over the square
Attach an onmouseout event handler to the element with the id square In response to the event run an anonymous function containing a command that changes the innerHTML property of the element with the id feedback to an empty text string.
Repeat Steps and for the element with the id triangle
Repeat Steps and for the element with the id circle
Save your changes to the file and then open projecthtml in your browser. Verify that as you hover your mouse pointer over each shape, a message indicating the shape is displayed on the page and when you move your mouse pointer away from the shape the message disappears.
Please take screenshots of your work.
Please submit your file and screenshots for grading.
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