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:
<formname="myform"><ahref="javascript: submitform()">Submit</a></form>
Submit form function:
<scripttype="text/javascript">functionsubmitform()
{
document.myform.submit();
}
</script>
Invoke submission:
document.forms["myform"].submit();
Solution 3:
you should add value attribute on submit button like that
<inputtype="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"