HTML | DOM Form autocomplete Property Last Updated : 31 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Form autocomplete property in HTML DOM is used to set or return of the autocomplete attribute. The autocomplete attribute is used to specify whether the autocomplete attribute has "on" or "off" value. When the autocomplete attribute is set to on so the browser will automatically complete the values base on which the user entered before. Syntax: It is used to return the autocomplete property. formObject.autocomplete It is used to set the autocomplete property. formObject.autocomplete = on|off Property Values: on: It is the default value. It automatically complete the values. off: It defines that the user should fill all the values of the input field. It dopes not automatically complete the values. Return Value: It returns a string value which represent the state of autocomplete attribute. Example 1: This HTML Program illustrates how to return the property. html <!DOCTYPE html> <html> <head> <title> HTML DOM Form autocomplete Property </title> </head> <body> <h1>GeeksForGeeks</h1> <h2>DOM Form autocomplete Property</h2> <form action="#" method="post" id="users" autocomplete="on"> <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> </form> <button onclick="myGeeks()">Submit</button> <p id="GFG"></p> <!-- Script to display autocomplete value --> <script> function myGeeks() { var auto_comp = document.getElementById("users").autocomplete; document.getElementById("GFG").innerHTML = auto_comp; } </script> </body> </html> Output: Before Click on the Button: After Click on the Button: Example 2: This example set the form autocomplete to off. html <!DOCTYPE html> <html> <head> <title> HTML DOM Form autocomplete Property </title> </head> <body> <h1>GeeksForGeeks</h1> <h2>DOM Form autocomplete Property</h2> <form action = "#" method="post" id="users" autocomplete="on"> <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> </form> <button onclick="myGeeks()">Submit</button> <p id="GFG"></p> <script> function myGeeks() { var x = document.getElementById("users").autocomplete = "off"; document.getElementById("GFG").innerHTML = "Now the autocomplete is set to " + x; } </script> </body> </html> Output: Before Click on the Button: After Click on the Button: Supported Browsers: The browser supported by DOM Form autocomplete property are listed below: Google Chrome 14 Edge 12 Firefox 4 Opera 15 Safari 6 Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads 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 HTML | DOM Ol type Property The DOM Ol type Property is used to set or return the type attribute in an ordered list. This attribute defines which type(1, A, a, I and i) of order you want in your list numeric, alphabetic or roman numbers. Syntax: It is used to return the type property. olObject.type It is used to set the type p 2 min read HTML | DOM Form enctype Property The Form enctype property in HTML DOM is used to set or return the value of the enctype attribute in a form. This attribute specifies the data that will be present in the form should be encoded when submitting to the server. This type of attribute can be used only if method = "POST". Syntax: It is u 3 min read HTML DOM Form reset() Method 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<!DOCTY 1 min read Like