Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Web Development Articles
Page 93 of 801
HTML DOM Input Number name Property
The HTML DOM Input Number name property returns and modifies the value of the name attribute of an input field with type="number". The name attribute identifies the input field when form data is submitted to the server. Syntax Following is the syntax for returning the name value − object.name Following is the syntax for modifying the name value − object.name = "text" Return Value The name property returns a string representing the value of the name attribute of the input number field. Example − Getting Name Property ...
Read MoreHTML DOM Input Number readOnly Property
The HTML DOM Input Number readOnly property sets or returns whether a number input field is read-only. When set to true, the input field becomes non-editable but remains focusable and its value can still be selected and copied. Syntax Following is the syntax to return the readOnly property − object.readOnly Following is the syntax to set the readOnly property − object.readOnly = true | false Property Values true − The input field is read-only and cannot be modified by the user. false − The input field is editable ...
Read MoreHTML DOM Input Number max Property
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 MoreHTML DOM Select length Property
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 MoreHTML DOM Select multiple Property
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 MoreHTML DOM Select name Property
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 MoreHTML DOM Select size Property
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 MoreHTML DOM Input Checkbox Object
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 MoreHTML DOM Input Checkbox required Property
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 MoreHTML DOM Input Color autofocus Property
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