javascript - Is there a way to send form when element outside of form is clicked? -


as title says, there way send form when element outside of form clicked? plus, available without using form associated (button/input etc.) elements?

as example, can form submitted when div clicked?

sure:

<form name="myform" action="" method="post">     <!-- form inputs go here --> </form>  <div id="formsubmit"></div>  <script type="text/javascript">     var myform = document.forms['myform'];     var formsubmit = document.getelementbyid('formsubmit');      formsubmit.onclick = function(){         myform.submit();     } </script> 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -