I\'m just learning javascript and php. I created a contact form and I\'d like the submit button to accomplish two things when I press it:
html:
Javascript: to submit the form using javascript
function eatFood() { document.getElementById('form1').submit(); }
to show onclick message
function eatFood() { alert('Form has been submitted'); }