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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -