How to design a message box for page that does not lead to another page

I just want to have a nice message box for a page that accepts the message and shows a reply (like thanks for the message, etc) remaining on that page only.

Show us your code so far.
You may need JavaScript event listeners.

You can use model with a background opacity. Well you will need to use the event listener any way