AmitDiwan

AmitDiwan

8,392 Articles Published

Articles by AmitDiwan

Page 275 of 840

HTML DOM Input Date step Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 315 Views

The HTML DOM Input Date step property sets or returns the value of the step attribute of a date input field. This property determines the legal day intervals that users can select when opening the date picker calendar. Syntax Following is the syntax for returning the step value − inputDateObject.step Following is the syntax for setting the step value − inputDateObject.step = number Parameters The step property accepts a numeric value that represents the number of days between selectable dates. The default value is 1, meaning all dates are ...

Read More

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 autofocus Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 167 Views

The HTML DOM Select autofocus property sets or returns whether a dropdown list should automatically receive focus when the page loads. This property corresponds to the HTML autofocus attribute and is useful for improving user experience by directing attention to important form elements. Syntax Following is the syntax for returning the autofocus property − selectObject.autofocus Following is the syntax for setting the autofocus property − selectObject.autofocus = true | false Property Values The autofocus property accepts the following values − true − The dropdown list will automatically ...

Read More

HTML DOM Select selectedIndex Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 238 Views

The HTML DOM select selectedIndex property returns and modifies the index of the selected option in 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 selectedIndex − object.selectedIndex Following is the syntax for modifying the selectedIndex − object.selectedIndex = number Return Value The selectedIndex property returns an integer representing the index of the selected option. If no option is selected, it returns -1. ...

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 177 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 189 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 Progress Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 245 Views

The DOM Progress Object represents the element in an HTML document. This object provides properties and methods to dynamically create and manipulate progress bars using JavaScript, allowing you to build interactive progress indicators for file uploads, form submissions, or loading states. Syntax Following is the syntax to create a progress object using JavaScript − document.createElement("PROGRESS"); You can also access an existing progress element using − document.getElementById("progressId"); document.getElementsByTagName("progress")[0]; Properties Following are the key properties of the Progress object − Property Description ...

Read More

HTML DOM Quote Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 209 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 Samp Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 201 Views

The HTML DOM Samp Object represents the HTML element, which is used to display sample output from computer programs, scripts, or systems. The element typically renders text in a monospace font to distinguish it from regular content. The DOM Samp Object provides access to all standard HTML element properties and methods, allowing you to manipulate elements dynamically with JavaScript. Syntax To create a new Samp object using JavaScript − document.createElement("SAMP"); To access an existing element − document.getElementById("sampId"); document.getElementsByTagName("samp")[0]; Creating a Samp Object You can ...

Read More
Showing 2741–2750 of 8,392 articles
« Prev 1 273 274 275 276 277 840 Next »
Advertisements