Question: Javascript - Create a 'Comment' form which will allow users to leave comments: Create a simple form with a textbox tag where the user can

Javascript - Create a 'Comment' form which will allow users to leave comments:

Create a simple form with a textbox tag where the user can type in their username (e.g. @myuser) and a text area where their comment text can be inserted. A button to post comments should be placed below these.

Use Boostrap classes to style all of the content on the page.

When the post button is clicked, a JavaScript event handler should handle the onClick event and write the new comment to a

tag below the comment form.

Each time a new comment is added, it should be appended to a paragraph below the comment form.

Use the built in Date object in JavaScript to place the date and time beside each comment.

Place a button at the bottom of each comment containing the text Like. A global variable totalLikes should be incremented by one each time the like button is clicked on any comment. Each time a Like button is clicked, an alert should pop up stating the total number of likes so far.

Each time a message is posted, the form should be cleared, to allow for the next comment.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!