<prompt> Write a JavaScript code to display an alert message when the Submit button is pressed.  <response>: Here is the JavaScript code you can use to display an alert message when the Submit button is pressed:javascriptdocument.getElementByIdsubmit-button.addEventListenerclick, function alertYour form has been submitted!;;This code selects the Submit button by its id attribute using document.getElementByIdsubmit-button. It then adds an event listener to the button that listens for click events, using the addEventListener method. When the button is clicked, the callback function is executed, which displays an alert message using the alert function. In this case, the alert message says Your form has been submitted!.Make sure to assign the proper id attribute in this example, idsubmit-button to the submit button in HTML, so that the element can be properly selected by the script above. 