HTML | DOM Form submit() Method Last Updated : 05 May, 2025 Comments Improve Suggest changes Like Article Like Report The form submit() Method in HTML DOM is used to send the form data to the web-server. It works as same as submit button. It does not contain any parameters. Syntax: formObject.submit()Example: index.html <!DOCTYPE html> <html> <head> <title> HTML DOM Form submit() Method </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <!-- HTML code to create form --> <h2>DOM Form submit() Method</h2> <form id="GFG" action="https://www.geeksforgeeks.org/community/"> <label for="username">Username:</label> <input type="text" name="username" id="Username"> <br> <label for="password">Password:</label> <input type="password" name="password" id ="password"> <br><br> <input type="button" onclick="myGeeks()" value="Submit form"> </form> <!-- script to use submit() method --> <script> function myGeeks() { document.getElementById("GFG").submit(); } </script> </body> </html> Temporary Note on Output : On Run, The output may show a "Refuse to Connect" error due to security restrictions from the GeeksforGeeks site, which prevents embedding. To see the output, replace the src URL with one that allows iframe embedding, such as "https://www.example.com".Output: Supported Browsers: The browser supported by DOM Form submit() method are listed below:Google Chrome 1 and aboveEdge 12 and aboveFirefox 1 and aboveOpera 12.1 and aboveSafari 3 and above Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM HTML-Methods +1 More Practice Tags : Misc Similar Reads HTML DOM Input Date Object HTML Input Date object represents an <input> element with type="date", enabling users to input dates conveniently via a built-in calendar interface on web forms. Syntax: For creating a <input> element with the type ="date":var gfg = document.createElement("input") gfg.setAttribute("type 3 min read HTML DOM InputEvent data Property The InputEvent data property is used to return the character that was inserted using the event. The InputEvent data property is a read-only property and it returns a string representing the character that was inserted. Syntax:event.dataReturn Value: It returns the input data from a text field. Below 1 min read HTML | DOM Style columnSpan Property The DOM style columnspan property is used to specify how many columns an element should span across. Syntax: It return the columnSpan property:object.style.columnSpanIt set the columnSpan property:object.style.columnSpan = "1|all|initial|inherit" Property Values: 1: Default value of the element. Use 3 min read HTML | DOM Input DatetimeLocal Object The Input DatetimeLocal object is used for representing an HTML <input> element of the type="datetime-local". The Input DatetimeLocal Object is a new object in HTML5. Syntax: For creating a <input> element with the type ="datetime-local":gfg = document.createElement("input") gfg.setAttri 3 min read HTML | DOM Style transformOrigin Property Every HTML element has some position on the screen. This position is described using co-ordinate geometry using x-axis and y-axis. The HTML DOM Style transformOrigin Property used to change the position of an HTML div. It helps in both 2D and 3D transformation.Syntax: To set the transformOrigin prop 2 min read HTML DOM Input Search Object The Input Search object is used for representing an HTML <input> element of the type="search". The Input Search Object is new in HTML5. Syntax: For creating a <input> element with the type ="search":let input_field = document.createElement("input");input_field.setAttribute("type", "sear 2 min read HTML | DOM Style borderSpacing Property The DOM Style borderSpacing Property is used to set or return the spacing between the cells in a table. Syntax: To get the borderSpacing propertyobject.style.borderSpacingTo set the borderSpacing propertyobject.style.borderSpacing = "length | initial | inherit" Return Values: It returns a string val 3 min read HTML DOM Audio Object The Audio object is used for representing an HTML <audio> element. The Audio Object is a new object in HTML5. Syntax: For creating an <audio> element:let gfg = document.createElement("AUDIO")For accessing an <audio> element:let x = document.getElementById("myAudio") Property Values 4 min read HTML | DOM Window stop() Method The stop() method in DOM is used to stop the window from loading resources in the current browsing context, similar to the browser's stop button. Syntax: window.stop() Example: Stop window from loading. html <!DOCTYPE html> <html> <head> <title> HTML | DOM Window stop() Metho 1 min read HTML | DOM Ol reversed Property The DOM Ol reversed Property is used to set or return whether the list items are in Descending order(9, 8, 7, 6, ...) or in Ascending order(1, 2, 3, 4...). Syntax: It is used to return the reversed property.olObject.reversedIt is used to set the reversed property.olObject.reversed = true|false Prope 2 min read Like