AmitDiwan

AmitDiwan

8,392 Articles Published

Articles by AmitDiwan

Page 276 of 840

HTML DOM Parameter Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 203 Views

The HTML DOM Parameter Object represents the element in an HTML document. The element defines parameters for elements, typically used for embedding multimedia content like audio, video, or plugins. Syntax Following is the syntax to create a param object using JavaScript − document.createElement("PARAM"); Following is the HTML syntax for the element − Properties of Parameter Object The Parameter Object has two main properties that correspond to its HTML attributes − Property Description ...

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 209 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 PopStateEvent Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 200 Views

The HTML DOM PopStateEvent object represents the event that is triggered when the browser's history changes, specifically when the user navigates using the back or forward buttons, or when the history is programmatically modified using history.back(), history.forward(), or history.go(). The popstate event is fired when the active history entry changes between two different history entries for the same document. It provides access to the state data that was stored when the history entry was created using pushState() or replaceState(). Syntax Following is the syntax to handle the popstate event − window.onpopstate = function(event) { ...

Read More

HTML DOM Pre Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 151 Views

The HTML DOM Pre Object represents the element in the Document Object Model (DOM). The element is used to display preformatted text, where whitespace and line breaks are preserved exactly as they appear in the HTML source. The Pre Object provides access to all the properties and methods of a standard HTML element, plus specific functionality for handling preformatted text content. Syntax To create a new pre element using JavaScript − document.createElement("PRE"); To access an existing pre element − document.getElementById("preId"); Creating a Pre Object You can ...

Read More

HTML DOM readyState Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 232 Views

The DOM readyState property returns the loading status of the current HTML document. This property indicates whether the document is still loading, has finished loading, or has completed loading along with all sub-resources like images and stylesheets. Syntax Following is the syntax for the readyState property − document.readyState Return Value The readyState property returns one of three possible string values − "loading" − The document is still loading content. "interactive" − The document has finished loading and parsing, but sub-resources like images may still be loading. "complete" − The document and ...

Read More

HTML DOM PageTransition Event

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 200 Views

The DOM PageTransitionEvent is fired when a user navigates to or away from a webpage. This event provides information about whether the page was loaded from the browser's cache (back-forward cache) or fetched fresh from the server. The PageTransitionEvent is particularly useful for detecting when pages are restored from the browser's cache, which can affect the state of JavaScript variables and DOM elements. Syntax Following is the syntax for adding PageTransitionEvent listeners − window.addEventListener('pageshow', function(event) { // Handle pageshow event }); window.addEventListener('pagehide', function(event) { // Handle pagehide event ...

Read More

HTML DOM Input Date stepDown() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 141 Views

The HTML DOM Input Date stepDown() method decreases the value of a date input field by a specified number of days. This method is useful for programmatically adjusting dates without requiring manual user input. Syntax Following is the syntax for the stepDown() method − inputDateObject.stepDown(number) Parameters The stepDown() method accepts the following parameter − number − An optional integer specifying how many days to decrease. If omitted, defaults to 1. Return Value The method does not return any value. It directly modifies the value of the ...

Read More

HTML DOM Input Date stepUp() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 133 Views

The HTML DOM Input Date stepUp() method increases the value of a date input field by a specified number of days. This method is useful for programmatically incrementing dates in forms without requiring user interaction with the date picker. Syntax Following is the syntax for the stepUp() method − inputDateObject.stepUp(number) Parameters The stepUp() method accepts the following parameter − number (optional) − A positive integer specifying how many days to increase the date value. If not provided, the default value is 1. Return Value The stepUp() method does ...

Read More
Showing 2751–2760 of 8,392 articles
« Prev 1 274 275 276 277 278 840 Next »
Advertisements