HTML DOM Input Submit formMethod Property Last Updated : 16 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The Input Submit formMethod Property in HTML DOM is used to set or return the value of the formMethod attribute of a submit Button. The formMethod attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of HTTP Methods, which are GET and POST. This attribute overrides the method attribute of a <form> element. Syntax: It returns the Input Submit formMethod property.submitObject.formMethodIt is used to set the Input Submit formMethod property.submitObject.formMethod = get|post Property Values: GET: In the GET method, after the submission of the form, the form values will be visible in the address bar of the new browser tab. It is the default value.POST: In the post method, after the submission of the form, the form values will not be visible in the address bar of the new browser tab as it was visible in the GET method. Return Value: It returns a string value which represent the HTTP method used to send data while submitting the form. Example 1: This example illustrates how to return Input Submit formMethod Property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Submit formMethod Property </title> </head> <body style="text-align:center;"> <h1> GeeksForGeeks </h1> <h2> HTML DOM Input Submit formMethod Property </h2> <form action="#" method="get" target="_self"> <input type="submit" id="Geeks" name="myGeeks" formTarget="_blank" value="Submit @ geeksforgeeks" formMethod="post"> </form> <p> click on below button to return the Property </p> <button onclick="myGeeks()"> Click Here! </button> <p id="GFG" style="font-size:25px;"></p> <!-- Script to set submit formMethod Property --> <script> function myGeeks() { let btn = document.getElementById("Geeks").formMethod; document.getElementById("GFG").innerHTML = btn; } </script> </body> </html> Output: Example 2: This example illustrates how to return Input Submit formMethod property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Input Submit formMethod Property </title> </head> <body style="text-align:center;"> <h1> GeeksForGeeks </h1> <h2> HTML DOM Input Submit formMethod Property </h2> <form action="#" method="get" target="_self"> <input type="submit" id="Geeks" name="myGeeks" formTarget="_blank" value="Submit @ geeksforgeeks" formMethod="post"> </form> <p> click on below button to set the Property </p> <button onclick="myGeeks()"> Click Here! </button> <p id="GFG" style="font-size:25px;"></p> <!-- Script to set submit formMethod Property --> <script> function myGeeks() { let btn = document.getElementById("Geeks").formMethod = "Get"; document.getElementById("GFG").innerHTML = "The value of the formMethod attribute" + " was changed to " + btn; } </script> </body> </html> Output: Supported Browsers: The browser supported by DOM input Submit formMethod Property are listed below: Google Chrome 1 and aboveEdge 12 and aboveFirefox 1 and aboveOperaSafari 1 and above Comment More infoAdvertise with us Next Article HTML DOM Input Submit formMethod Property M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML Web technologies HTML-DOM HTML-Property +2 More Practice Tags : Misc Similar Reads HTML DOM Input Submit formTarget Property The Input Submit formTarget Property in HTML DOM is used to set or return the value of the formtarget attribute of the submit field. The Target attribute is used to specify whether the submitted result will open in the current window, a new tab or on a new frame. Syntax: It is used to return the for 2 min read HTML | DOM Input Submit formNoValidate Property The Input Submit formNoValidate Property in HTML DOM is used to set or return whether the form data should be validate or not when submitting the form. This Property is used to reflect the HTML formnovalidate attribute. Syntax: It returns formNoValidate property. submitObject.formNoValidate It is us 2 min read HTML | DOM Input URL form Property The DOM Input URL form Property is used for returning the reference of the form containing the URL field. It is read-only property and returns a form object on success. Syntax: urlObject.form Return Values: It returns a string value which specify the reference of the form containing the Input URL fi 1 min read HTML DOM Input Tel form Property The DOM Input Tel form Property in HTML is used for returning the reference of the form containing the input tel field. It is a read-only property that returns a form object on success. Syntax: telObject.form Return Value: It returns a string value that specifies the reference of the form containing 1 min read HTML | DOM Input Text form Property The DOM Input Text form Property in HTML DOM is used to return the reference of form containing the input Text field. It is a read-only property that returns the form object on success. Syntax: textObject.form Return Values: It returns a string value which specify the reference of the form containin 1 min read HTML | DOM Input Time form Property The DOM Input Time form Property in HTML DOM is used for returning the reference to the form containing the time field. It is read-only Property that returns a form object on success. Syntax: timeObject.form Return Values: It returns a string value which specify the reference of the form containing 1 min read HTML DOM Input Submit name Property The Input Submit name Property in HTML DOM is used to set or return the value of name attribute of a submit field. The name attribute is required for each input field. If the name attribute is not specified in an input field then the data of that field would not be sent at all. Syntax: It returns th 2 min read HTML DOM Input Submit type Property The Input Submit type Property in HTML DOM returns the type of form element of the submit field. It always returns the submit for an Input submit field. Syntax: submitObject.typeReturn Values: It returns a string that represents the type of form element an input submit field is. Example: This examp 1 min read HTML | DOM Input Hidden form Property The Input Hidden form property is used to return the reference of the form containing the Input Hidden field. It is read-only Property that returns a form object on success. Syntax: hiddenObject.form Return Values: It returns a string value which specify the reference of the form containing the Inpu 1 min read HTML DOM Input Submit value Property The Input Submit value Property in HTML DOM is used to set or return the value of the Input Submit Field. The value attribute specifies the text displayed in the Submit Field. Syntax: It returns the value property.submitObject.valueIt is used to set the value property.submitObject.value = textProp 2 min read Like