HTML Articles

Page 98 of 151

HTML DOM Input Number max Property

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

The HTML DOM input number max property returns and modifies the value of the max attribute of an input field with type="number". This property sets the maximum allowed value for the number input field. Syntax Following is the syntax for getting the max value − object.max Following is the syntax for setting the max value − object.max = "number" Parameters The max property accepts a single parameter − number − A string representing the maximum value allowed for the number input. It can be an integer or ...

Read More

HTML DOM Select length Property

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

The HTML DOM select length property returns the number of elements inside a drop-down list. This read-only property is useful for dynamically counting options in a select element without manually iterating through them. Syntax Following is the syntax for the select length property − selectObject.length Return Value The length property returns a number representing the total count of elements within the select element. If no options are present, it returns 0. Example − Basic Usage Following example demonstrates how to get the number of options in a select element ...

Read More

HTML DOM Select multiple Property

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

The HTML DOM select multiple property sets or returns whether multiple options can be selected from a drop-down list. When enabled, users can select multiple options by holding Ctrl (Windows) or Cmd (Mac) while clicking, or by using Shift to select a range. Syntax Following is the syntax for returning the multiple property − object.multiple Following is the syntax for setting the multiple property − object.multiple = true | false Property Values Value Description true Allows multiple options to be selected from ...

Read More

HTML DOM Select name Property

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

The HTML DOM Select name property returns and modifies the value of the name attribute of a dropdown list (select element) in an HTML document. This property is essential for form data processing and server-side identification of form elements. Syntax Following is the syntax for returning the name property − object.name Following is the syntax for modifying the name property − object.name = "text" Parameters text − A string value that specifies the new name for the select element. Return Value The property returns a ...

Read More

HTML DOM Select size Property

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

The HTML DOM select.size property returns and modifies the value of the size attribute of a dropdown list. This property controls how many options are visible at once in the select element without scrolling. Syntax Following is the syntax for returning the size value − selectObject.size Following is the syntax for setting the size value − selectObject.size = number Parameters The size property accepts the following parameter − number − A positive integer that specifies how many options should be visible in the dropdown list without scrolling. ...

Read More

HTML DOM Input Checkbox Object

Kumar Varma
Kumar Varma
Updated on 16-Mar-2026 524 Views

The HTML DOM Input Checkbox Object represents an HTML input element with type "checkbox". It provides properties and methods to interact with checkbox elements programmatically, allowing you to get or set their state, value, and other attributes through JavaScript. Syntax Following is the syntax to create a checkbox element using JavaScript − var checkboxObject = document.createElement("input"); checkboxObject.type = "checkbox"; To access an existing checkbox element − var checkboxObject = document.getElementById("checkboxId"); // or var checkboxObject = document.getElementsByName("checkboxName")[0]; Properties The Input Checkbox Object has the following properties − ...

Read More

HTML DOM Input Checkbox required Property

Rama Giri
Rama Giri
Updated on 16-Mar-2026 438 Views

The HTML DOM Input Checkbox required property determines whether a checkbox input must be checked before a form can be submitted. This property corresponds to the HTML required attribute and provides a way to enforce mandatory checkbox selections in web forms. Syntax Following is the syntax for getting the required property value − inputCheckboxObject.required Following is the syntax for setting the required property − inputCheckboxObject.required = booleanValue Return Value The required property returns a Boolean value − true − The checkbox is required and must be checked ...

Read More

HTML DOM Input Color autofocus Property

Kumar Varma
Kumar Varma
Updated on 16-Mar-2026 163 Views

The HTML DOM Input Color autofocus property sets or returns whether a color input field automatically receives focus when the page loads. When set to true, the color input will be highlighted and ready for user interaction immediately upon page load. Syntax Following is the syntax for returning the autofocus property value − inputColorObject.autofocus Following is the syntax for setting the autofocus property − inputColorObject.autofocus = booleanValue Parameters The booleanValue parameter can be one of the following − Value Description true ...

Read More

HTML DOM Input Color Object

Rama Giri
Rama Giri
Updated on 16-Mar-2026 207 Views

The HTML DOM Input Color Object represents an HTML input element with type="color". This object provides methods and properties to interact with color picker elements through JavaScript, allowing developers to create, access, and manipulate color input fields programmatically. Syntax Following is the syntax for creating an input color object − var colorObject = document.createElement("input"); colorObject.type = "color"; Following is the syntax for accessing an existing color input − var colorObject = document.getElementById("colorId"); Properties The Input Color Object supports several properties that allow you to control its behavior and appearance ...

Read More

HTML DOM Input Color value Property

Rama Giri
Rama Giri
Updated on 16-Mar-2026 162 Views

The HTML DOM Input Color value property returns or sets the value of an HTML color input field as a hexadecimal color string. This property allows you to programmatically get the currently selected color or change the color picker to display a different color value. Syntax Following is the syntax for returning the color value − inputColorObject.value Following is the syntax for setting the color value − inputColorObject.value = "hexColorString" Return Value The value property returns a string representing the color in hexadecimal format (e.g., #ff0000 for red). If ...

Read More
Showing 971–980 of 1,509 articles
« Prev 1 96 97 98 99 100 151 Next »
Advertisements