Adding onsubmit to a form via javascript
问题 How would you go about inserting an OnSubmit attribute to a form via Javascript only? I'm pretty new to javascript so if you're able to provide detailed example code, that would be most helpful! Here's the situation: I'm using a hosted signup page through Chargify (a payments platform) in order to process credit cards for my app, and then send the user back to my own thank you/confirmation page. Tracking the entire funnel through google analytics is proving quite elusive due to changing