JS - How To Submit Form Onclick And Send Submit Button
I need to submit form by button which is out of scope of the form by JavaSript.
Solution 2:
Give the form a name:
<form name="myform">
<a href="javascript: submitform()">Submit</a>
</form>
Submit form function:
<script type="text/javascript">
function submitform()
{
document.myform.submit();
}
</script>
Invoke submission:
document.forms["myform"].submit();
Solution 3:
you should add value attribute on submit button like that
<input type="submit" name="send" value="xyz" id="send-button" style="display: none">
i think you will received both values
Post a Comment for "JS - How To Submit Form Onclick And Send Submit Button"