Web Development Articles

Page 91 of 801

HTML DOM Anchor hash Property

Arjun Thakur
Arjun Thakur
Updated on 16-Mar-2026 244 Views

The HTML DOM Anchor hash property is used to set or return the anchor part of the href attribute value. The anchor part is the portion of the URL that comes after the # symbol, which is used for navigation to specific sections within a page. Syntax Following is the syntax to set the hash property − anchorObject.hash = anchor_part Above, anchor_part is the anchor part of the URL including the # symbol. Following is the syntax to return the hash property − anchorObject.hash Return Value The hash ...

Read More

HTML DOM Input Button form Property

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 189 Views

The HTML DOM Input Button form property returns a reference to the form element that contains the input button. This property is read-only and provides access to the parent form of a button element, enabling you to identify which form the button belongs to and access form-level properties or methods. Syntax Following is the syntax for accessing the form property − buttonElement.form Return Value The form property returns a reference to the element that contains the button. If the button is not inside a form, it returns null. Example − Basic ...

Read More

HTML DOM Input Button Object

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 302 Views

The HTML DOM Input Button Object represents an HTML input element with the type attribute set to "button". This object provides programmatic access to button elements, allowing you to create, modify, and interact with buttons dynamically using JavaScript. The Input Button Object is used to create interactive buttons that can trigger JavaScript functions when clicked. Unlike submit buttons, these buttons do not automatically submit forms but instead execute custom JavaScript code. Syntax Following is the syntax to create an Input Button Object dynamically − var newButton = document.createElement("INPUT"); newButton.setAttribute("type", "button"); To access an ...

Read More

HTML DOM Input Checkbox defaultChecked Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 464 Views

The HTML DOM input checkbox defaultChecked property returns the default value of the checked attribute of a checkbox element. This property reflects whether the checkbox was initially checked when the page loaded, regardless of its current state. Syntax Following is the syntax for getting the defaultChecked property − checkboxObject.defaultChecked This property returns a boolean value − true − if the checkbox was initially checked (had the checked attribute) false − if the checkbox was initially unchecked Understanding defaultChecked vs checked The defaultChecked property differs from the checked property − ...

Read More

HTML DOM Input Checkbox autofocus Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 238 Views

The HTML DOM Input Checkbox autofocus Property sets or returns whether a checkbox should automatically receive focus when the page loads. This property corresponds to the autofocus attribute in HTML and is useful for improving user experience by directing attention to important form elements. When a checkbox has the autofocus property set to true, it will be highlighted with a focus outline as soon as the page finishes loading, without requiring user interaction. Syntax Following is the syntax for returning the autofocus property − checkboxObject.autofocus Following is the syntax for setting the autofocus ...

Read More

HTML DOM Option text Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 201 Views

The HTML DOM option text property allows you to retrieve and modify the text content of an element within a dropdown. This property is useful for dynamically updating option labels without recreating the entire select element. Syntax Following is the syntax for getting the text value − optionElement.text Following is the syntax for setting the text value − optionElement.text = "newText" Return Value The property returns a string representing the text content of the option element. When setting, it accepts a string value that becomes the new ...

Read More

HTML DOM Input FileUpload Object

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 432 Views

The HTML DOM Input FileUpload Object represents an element with type="file" in an HTML document. This object provides properties and methods to interact with file upload elements programmatically, allowing developers to create, modify, and access file input controls dynamically. Creating a FileUpload Object You can create a FileUpload object dynamically using JavaScript's createElement() method − Syntax var fileUploadBtn = document.createElement("INPUT"); fileUploadBtn.setAttribute("type", "file"); Alternatively, you can access an existing file input element using − var fileUploadBtn = document.getElementById("fileId"); // or var fileUploadBtn = document.getElementsByTagName("input")[0]; Properties The HTML DOM ...

Read More

HTML DOM Input Hidden Object

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 520 Views

The HTML DOM Input Hidden Object represents an element with type="hidden" in an HTML document. Hidden input fields are invisible to users but store data that gets submitted with forms, making them useful for maintaining state information, tokens, or IDs. Syntax Following is the syntax to create an input hidden object − var hiddenInput = document.createElement("INPUT"); hiddenInput.setAttribute("type", "hidden"); You can also access an existing hidden input element − var hiddenInput = document.getElementById("hiddenFieldId"); Properties Following are the properties of HTML DOM Input Hidden Object − ...

Read More

HTML DOM Input Hidden value Property

Sharon Christine
Sharon Christine
Updated on 16-Mar-2026 365 Views

The HTML DOM Input Hidden value property returns and modifies the content of the value attribute of an input field with type="hidden". Hidden input fields are invisible to users but store data that can be accessed and manipulated using JavaScript. Hidden input fields are commonly used to store temporary data, user session information, or values that need to be submitted with forms without displaying them to users. Syntax Following is the syntax for returning the value − object.value Following is the syntax for modifying the value − object.value = "text" ...

Read More

HTML DOM Input Image Object

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 290 Views

The HTML DOM Input Image Object represents the element with type="image" in an HTML document. This object provides an interface to create and manipulate image submit buttons that can be used in forms to submit data while displaying a custom image instead of a regular submit button. The Input Image Object is particularly useful when you want to create visually appealing submit buttons using custom images, while still maintaining all the functionality of a standard form submit button. Syntax Following is the syntax to create an Input Image Object using JavaScript − var imageInput ...

Read More
Showing 901–910 of 8,010 articles
« Prev 1 89 90 91 92 93 801 Next »
Advertisements