HTML DOM Form reset() Method Last Updated : 08 Oct, 2024 Comments Improve Suggest changes Like Article Like Report The reset() method in the HTML DOM is used to reset a form fields to their default values. When a form is reset, all user input is cleared, and the fields revert to their initial states.SyntaxformObject.reset()Example: In this example, clicking the reset button clears the form inputs. html <!DOCTYPE html> <html> <head> <title> HTML DOM Form reset() Method </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>DOM Form reset() Method</h2> <!-- HTML code to create form --> <form action="#" method="post" id="users"> <label for="username">Username:</label> <input type="text" name="username" id="Username"> <br><br> <label for="password">Password:</label> <input type="password" name="password" id="password"> <br><br> <input type="reset" id="GFG" value="Reset"> </form> <!-- script to use reset() method --> <script> document.getElementById("GFG").reset(); </script> </body> </html> Output Supported Browsers: The browser supported by DOM Form reset() method are listed below:Chrome 1Edge 12Firefox 1Opera 8Safari 3 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 Style alignSelf Property The DOM Style alignSelf property is used to set or return the alignment for a selected item inside a flexible container. Syntax: To get the alignSelf Propertyobject.style.alignSelfTo set the alignSelf Propertyobject.style.alignSelf = "auto | stretch | center | flex-start | flex-end | baseline | init 6 min read 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 Like