As the title says, is there a way to submit formwhen an element is clicked outside the form? Also, is it accessible without the use of formrelated ( button/ inputetc.) Elements?
form
button
input
As an example, you can send formwhen you click div?
div
Of course:
<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>
document.getElementById("formName").submit();
, form.submit().
form.submit()
, .
(button/input/div), - javascript
$("#YourFormId").submit();
Source: https://habr.com/ru/post/1756213/More articles:Can I look forward to creating instances registered as singles using the castle's windsor? - dependency-injectionhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1756209/cuda-maintain-pointers-to-global-memory&usg=ALkJrhh5O8AJSouT9qSqGHoBbPuROu8tUgHow to create a new intent for another application broadcast receiver? - androidHow to start an application from my other application? - androidHow can I put a background image at an absolute distance to the right of its container? - cssAccess to Incoming / Outgoing Email in Android? - androidHow to run Android applications from another application - androidAvoid stretching UIImage inside my UIImageView - iphonemerge tables with django - pythonAccess Methods from an ATL DLL in C # - c #All Articles