AmitDiwan

AmitDiwan

8,392 Articles Published

Articles by AmitDiwan

Page 253 of 840

HTML DOM Input Range step property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 215 Views

The HTML DOM Input Range step property is used to set or return the step attribute value of a range slider control. It specifies the increment value for each movement of the slider. By combining the step property with min and max attributes, you can define precise intervals for legal values within the range. Syntax Following is the syntax for setting the step property − rangeObject.step = number Following is the syntax for returning the step property − rangeObject.step Parameters The step property accepts the following parameter − ...

Read More

HTML onblur Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 344 Views

The onblur event attribute in HTML is triggered when an element loses focus. This commonly occurs when a user clicks away from an input field, button, or other focusable element, or when they press the Tab key to navigate to another element. Syntax Following is the syntax for the onblur event attribute − Content The script parameter contains JavaScript code that executes when the element loses focus. Common Use Cases The onblur event is commonly used in the following scenarios − Form validation − Validate input fields when users move ...

Read More

HTML Window self Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 227 Views

The HTML Window self property returns a reference to the current window object. It is essentially the same as the global window object and is commonly used to check if the current window is the topmost window or if it's embedded within a frame or iframe. Syntax Following is the syntax for accessing the window self property − window.self The window.self property returns the window object itself, making it equivalent to simply using window. Return Value The window.self property returns the current window object reference. Common Use Cases The window ...

Read More

HTML onclick Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 630 Views

The onclick event attribute in HTML is triggered when a user clicks on an HTML element. It allows you to execute JavaScript code in response to mouse clicks, making web pages interactive and dynamic. Syntax Following is the syntax for the onclick event attribute − Content Where script can be either a JavaScript function call or inline JavaScript code that executes when the element is clicked. Basic Example Following example demonstrates a simple onclick event that displays an alert message − Basic onclick Example ...

Read More

HTML Window sessionStorage Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 377 Views

The HTML Window sessionStorage property allows us to store key/value pairs data in a web browser for one session only. The data is automatically deleted when the browser tab is closed, making it perfect for temporary data storage during a user's visit. The sessionStorage is part of the Web Storage API and provides a way to store data locally within the user's browser with session-level persistence. Unlike localStorage, sessionStorage data does not persist across browser sessions. Syntax Following is the syntax to access the sessionStorage object − window.sessionStorage SessionStorage Methods The sessionStorage ...

Read More

HTML DOM exitFullscreen() method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 107 Views

The HTML DOM exitFullscreen() method is used to exit fullscreen mode for an element that is currently displayed in fullscreen. This method is called on the document object, not on individual elements, and it returns a Promise that resolves when the element has exited fullscreen mode. Syntax Following is the syntax for the exitFullscreen() method − document.exitFullscreen() Return Value The method returns a Promise that resolves to undefined when fullscreen mode is successfully exited. The Promise may be rejected if an error occurs during the exit process. How It Works The ...

Read More

HTML DOM Input Range stepDown() method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 187 Views

The HTML DOM Input Range stepDown() method is used to decrement the value of a range slider by a specified amount. If no parameter is provided, it decrements by 1. When the step attribute is defined on the range input, the stepDown() method decrements in multiples of that step value. Syntax Following is the syntax for the Range stepDown() method − rangeObject.stepDown(number) Parameters The method accepts the following parameter − number − An optional numeric parameter specifying how many steps to decrement. If omitted, defaults to 1. How It ...

Read More

HTML onchange Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 655 Views

The onchange event attribute in HTML is triggered when the value of a form element changes and loses focus. This event is commonly used with form controls like input fields, select dropdowns, and textareas to execute JavaScript code when the user modifies the element's value. Syntax Following is the syntax for the onchange event attribute − Where script is the JavaScript code to execute when the change event occurs. Supported Elements The onchange event attribute is supported on the following HTML elements − elements (text, password, email, number, ...

Read More

HTML DOM Video currentTime Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 458 Views

The HTML DOM Video currentTime property returns or sets the current playback position of a video element in seconds. This property is commonly used to create custom video controls, implement seek functionality, or track video progress. Syntax Following is the syntax to get the current time position − mediaObject.currentTime Following is the syntax to set the current time position − mediaObject.currentTime = seconds Parameters seconds − A numeric value representing the time position in seconds where you want to set the playback position. The value should be within the ...

Read More

HTML DOM Fieldset disabled property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 468 Views

The HTML DOM Fieldset disabled property controls whether form elements inside a fieldset are enabled or disabled. When set to true, all form controls within the fieldset become disabled and appear greyed out. Users cannot interact with disabled elements − they cannot click, type, or select them. Syntax Following is the syntax to set the disabled property − fieldsetObject.disabled = true|false Following is the syntax to return the disabled property − fieldsetObject.disabled Where fieldsetObject is a reference to a fieldset element obtained using methods like getElementById() or querySelector(). Parameters ...

Read More
Showing 2521–2530 of 8,392 articles
« Prev 1 251 252 253 254 255 840 Next »
Advertisements