Jump to content

submit with javascript


fred asselyon
 Share

Recommended Posts

Is it possible to make the <a> element act like a submit button with javascript onClick thing?something like:<a href="#" onClick='thecode'>Submit</a>Thanks in advance!  :)

Yes it is.<a href="#" onclick="document.forms['form1'].submit()">Submit</a>or<a href="java script:document.forms['form1'].submit()">Submit</a><form name="form1" action="" method="post">
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...