I am looking to write a javascript function that will fire when a user submits a form, however I do not have edit access to the submit button so that I can add the onsubmit function. I am able to add a <script> tag, so if I can detect the submit, then I can execute my code. Anyone know how to do this?
I am looking to write a javascript function that will fire when a user
Share
You can locate the submit button through the DOM (
getElementByID()ordocument.formnamecome to mind) and then set the submit button’sonsubmitvalue to a function of your choice.