Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
Write a JavaScript code to display an alert message when the 'Submit' button is pressed.

### Response:
The JavaScript code to display an alert message when the 'Submit' button is pressed is:

`document.getElementById("submit").addEventListener("click", function(){ alert("Form submitted successfully");});`