Question: JavaScript Add a div with the class name of container and style it to center at 2 5 % on the page. Inside the container
JavaScript
Add a div with the class name of container and style it to center at on the page.
Inside the container div, have a label and input box for the persons email, name, and textarea field to describe what was lost. Give all inputs an id to use in JavaScript.
Add a button below the input boxes called submit
When the button is clicked then have it trigger an event in JavaScript. Have it check if all fields inputs are filled out and if they arent then display a message saying to fill out all the fields.
Create an object using a constructor function called Lost with attributes for email, name, and description
Inside the previously created event, have it instantiate the Lost object if all the fields are filled out, and use the input box values to populate it
Add a new div element to the div container and in its innerHtml tell the user by first name use split for the name value that someone will be calling you at your number within one business day. Use the object that you created to populate parts of the message
Lastly in the event clear the input boxes on the page.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
