One typical way is to refer to a javascript that is build using database code.
When the .js file is requested, code is executed to build the javascript code so that it appears, to the browser, to have hardcoded a set of responses to show.
Then, when you post a new response, this is then added to the database, and when the javascript is refreshed, it is rebuilt, and will contain this new comment.
I don't remember the details around how to reference the script file so that the browser won't keep using the cached copy after you've added new comments, I've only used such a commenting system once, and I can't remember the name of it.
Haloscan is one such provider of such commenting systems.