Reputation: 2091
I want to fire a click event during the onsubmit
of form. In button click event I used a url which it has to redirect. I don't want to use the form's 'action" to redirect the page.
Can anyone help me in this?
Upvotes: 0
Views: 357
Reputation: 11
Add an onsubmit event handler to your form element as follows:
form onsubmit='javascript:window.location.href="http://google.com"; return false;'
Upvotes: 1