Or, possibly better . As you can see we made a variation of sending buttons, changing the text of the value attribute. It returns the text or, if Cancel button or Esc is clicked, null. I think I would replace the submit button with an ordinary button and use JavaScript to add the confirmation message. If you would like to perform a jQuery or JavaScript action after a form is submitted, there are three different events you may use, depending on the "On Submit" action you have selected in … prompt shows a message asking the user to input text. Submit form Onclick using JavaScript, we will explain you different ways to submit a form using id, class, name and tag of form with the help of submit() function. Set the character encodings that are used for form submission in HTML The