Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions