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
Articles by AmitDiwan
Page 246 of 840
HTML ontoggle Event Attribute
The HTML ontoggle event attribute is triggered when a user opens or closes a element. This event fires whenever the element's open attribute is added or removed, making it useful for creating interactive collapsible content sections. Syntax Following is the syntax for the ontoggle event attribute − Summary text Content to toggle Where script is the JavaScript function or code to execute when the details element is toggled. Parameters The ontoggle attribute accepts the following parameter − script − JavaScript function ...
Read MoreHTML DOM Input Time step Property
The HTML DOM Input Time step property sets or returns the legal number intervals for the seconds component of a time input field. This property controls the granularity of time selection, determining which second values are considered valid when users interact with the time picker. Syntax Following is the syntax for returning the step value − inputTimeObject.step Following is the syntax for setting the step value − inputTimeObject.step = number Parameters The step property accepts numeric values representing seconds − Parameter Description ...
Read MoreHTML DOM Input Password size property
The HTML DOM Input Password size property is used for setting or returning the size attribute value of a password input field. It defines the visible width of the password field in terms of characters. The default width is 20 characters. Syntax Following is the syntax for setting the password size property − passwordObject.size = number Following is the syntax for getting the password size property − passwordObject.size Here, number represents the password field width in characters. The default width is 20 characters. Return Value The size property ...
Read MoreHTML onwheel Event Attribute
The onwheel event attribute in HTML is triggered when the user moves the mouse wheel up or down on an HTML element. This event fires regardless of whether the element is scrollable or not, making it useful for creating custom interactions based on wheel movement. Syntax Following is the syntax for the onwheel event attribute − Content Where script is the JavaScript code or function to be executed when the wheel event occurs. Parameters The onwheel event automatically passes an event object containing information about the wheel action − event.deltaY ...
Read MoreWhy doesn't the height of a container element increase if it contains floated elements?
When a container element contains only floated elements, it doesn't automatically increase in height to contain them. This happens because floated elements are removed from the normal document flow, causing the parent container to "collapse" as if it contains no content. Why This Happens The CSS float property removes elements from the normal document flow, making them float to the left or right of their container. Since floated elements no longer occupy space in the normal flow, their parent container doesn't recognize their height, resulting in a collapsed container. Container Height Problem with Floated ...
Read MoreHTML DOM Input Time stepDown( ) Method
The HTML DOM Input Time stepDown() method decreases the value of a time input field by a specified number of minutes. This method is particularly useful for creating time adjustment interfaces or implementing custom time picker controls. Syntax Following is the syntax for the stepDown() method − inputTimeObject.stepDown(number) Parameters The method accepts one optional parameter − number − An integer representing the number of minutes to decrease from the time value. If not specified, the default value is 1. Return Value The stepDown() method does not return any ...
Read MoreHTML DOM Input Password type property
The HTML DOM Input password type property is associated with input elements that have type="password". This property returns the string "password" when accessed on a password input field. It is a read-only property that identifies the input type. Syntax Following is the syntax for accessing the password type property − passwordObject.type Return Value The type property returns a string value "password" for input elements with type="password". Example − Getting Input Type Following example demonstrates how to retrieve the type of a password input field − ...
Read MoreHTML onerror Event Attribute
The HTML onerror event attribute is triggered when an error occurs while loading an external file in an HTML document. This attribute is commonly used with , , , and elements to handle loading failures gracefully. Syntax Following is the syntax for the onerror event attribute − Content Where script is JavaScript code that executes when the loading error occurs. Common Use Cases The onerror attribute is typically used in the following scenarios − Image fallback − Display a placeholder image when the original image fails to load Script ...
Read MoreHTML DOM Input Time stepUp( ) Method
The HTML DOM Input Time stepUp() method is used to increase the value of a time input field by a specified number of minutes. This method provides a programmatic way to increment time values, making it useful for creating time pickers and scheduling interfaces. Syntax Following is the syntax for the stepUp() method − inputTimeObject.stepUp(number) Parameters The stepUp() method accepts one optional parameter − number − An optional integer that specifies the number of minutes to increase the time value. If omitted, the default value is 1. Return Value ...
Read MoreHTML DOM Column object
The HTML DOM Column object represents the HTML element in the Document Object Model. This object allows you to manipulate column properties within HTML tables programmatically. The element is used exclusively within elements to define column properties that can be applied to entire table columns at once. Syntax Following is the syntax for accessing an existing Column object − var columnElement = document.getElementById("columnId"); Following is the syntax for creating a new Column object − var newColumn = document.createElement("COL"); Properties The Column object supports the following key ...
Read More