I have the following:
I found that, chrome at least, adds to the message the title of the input automatically, so no extra js is required, see this:
the input looks like this: