Front End Technology Articles

Page 109 of 652

HTML DOM Select form Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 232 Views

The HTML DOM select form property returns a reference to the form element that contains the dropdown list. This read-only property is useful for identifying which form a select element belongs to, especially in documents with multiple forms. Syntax Following is the syntax for the select form property − selectElement.form Return Value The property returns a reference to the form element that contains the select element. If the select element is not within a form, it returns null. Example − Basic Form Reference Following example demonstrates how to get the form ...

Read More

HTML DOM Select add() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 225 Views

The HTML DOM select add() method is used to add a new option element to an HTML dropdown list. This method dynamically inserts options into existing select lists, making it useful for creating interactive forms where options are added based on user actions or other conditions. Syntax Following is the syntax for the select add() method − selectObject.add(option, index) Parameters The add() method accepts the following parameters − option − An HTMLOptionElement object or HTMLOptGroupElement object to be added to the select list. index (optional) − An integer specifying the ...

Read More

HTML DOM Select remove() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 178 Views

The HTML DOM Select remove() method removes an option from a dropdown list (select element) in an HTML document. This method is useful for dynamically managing dropdown options based on user interactions or application logic. Syntax Following is the syntax for the Select remove() method − selectObject.remove(index) Parameters The method accepts the following parameter − index − A number representing the index position of the option to be removed. The index starts from 0 for the first option. Return Value This method does not return any value. It ...

Read More

HTML DOM Option index Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 190 Views

The HTML DOM Option index property returns or sets the index position of an option element within a dropdown list. The index is zero-based, meaning the first option has an index of 0, the second option has an index of 1, and so on. Syntax Following is the syntax for returning the index of an option − optionObject.index Following is the syntax for setting the index of an option − optionObject.index = number Return Value The index property returns a number representing the zero-based index position of the ...

Read More

HTML DOM Quote Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 210 Views

The HTML DOM Quote Object represents the element of an HTML document. The Quote object is used to create and manipulate inline quotations programmatically through JavaScript. It provides access to properties specific to the quote element, such as the cite attribute for referencing the source of the quote. Syntax Following is the syntax to create a Quote object using JavaScript − document.createElement("Q"); To access an existing Quote element by ID − document.getElementById("quoteId"); Properties The Quote object inherits all standard HTML element properties and methods. The specific property for ...

Read More

HTML DOM Option defaultSelected Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 152 Views

The HTML DOM Option defaultSelected property returns a boolean value indicating whether an option element was selected by default when the page loaded. This property reflects the presence of the selected attribute in the HTML markup, not the current selection state. Syntax Following is the syntax for the defaultSelected property − optionObject.defaultSelected Return Value The defaultSelected property returns − true if the option was selected by default (has the selected attribute) false if the option was not selected by default Basic Example Following example demonstrates the defaultSelected property ...

Read More

HTML DOM Option label Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 166 Views

The DOM option label property is used to get or set the value of the label attribute of an element in HTML. The label attribute provides a shorter alternative text for the option, which can be displayed in the dropdown instead of the option's content. Syntax Following is the syntax to return the label value − object.label Following is the syntax to modify the label value − object.label = "text" Return Value The property returns a string representing the value of the label attribute. If no label attribute ...

Read More

HTML DOM Option value Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 213 Views

The HTML DOM option value property allows you to get or set the value of an element within a dropdown. This value is what gets sent to the server when the form is submitted, which may differ from the visible text displayed to the user. Syntax Following is the syntax for returning the value − optionObject.value Following is the syntax for setting the value − optionObject.value = "newValue" Parameters newValue − A string that specifies the new value for the option element. Return Value ...

Read More

HTML DOM Input Date type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 181 Views

The HTML DOM Input Date type Property returns or sets the type attribute of an input element with date type. This property allows you to dynamically change the input type from a date picker to other input types like text, radio, or checkbox using JavaScript. Syntax Following is the syntax for returning the type property − inputDateObject.type Following is the syntax for setting the type property − inputDateObject.type = stringValue Parameters The stringValue parameter can be any valid HTML input type. Common values include − ...

Read More

HTML DOM Input Date value Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 179 Views

The HTML DOM Input Date value property allows you to get or set the value of an element. The value is returned as a string in YYYY-MM-DD format, which is the ISO 8601 date format standard. Syntax Following is the syntax to get the value − inputDateObject.value Following is the syntax to set the value − inputDateObject.value = 'YYYY-MM-DD' Return Value The value property returns a string representing the selected date in YYYY-MM-DD format. If no date is selected, it returns an empty string. Getting the Date ...

Read More
Showing 1081–1090 of 6,519 articles
« Prev 1 107 108 109 110 111 652 Next »
Advertisements