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 on Trending Technologies
Technical articles with clear explanations and examples
HTML DOM Input Button disabled Property
The HTML DOM Input Button disabled property returns and modifies the value of the disabled attribute of an input button element. When set to true, the button becomes non-interactive and appears grayed out. When set to false, the button is enabled and can be clicked. Syntax Following is the syntax for returning the disabled property − object.disabled Following is the syntax for setting the disabled property − object.disabled = true|false Property Values The disabled property accepts the following boolean values − true − Disables the button, making ...
Read MoreHTML DOM Input DatetimeLocal Object
The HTML DOM Input DatetimeLocal Object represents an HTML input element with type="datetime-local". This input type allows users to select both a date and time without timezone information, providing a convenient interface for date-time selection in web forms. The datetime-local input displays a date picker combined with a time picker, making it easier for users to enter precise date and time values. The selected value is stored in the format YYYY-MM-DDTHH:MM. Syntax Following is the syntax for creating an input element with type datetime-local − To create a datetime-local input programmatically using ...
Read MoreHow to use datetime input type in HTML?
The datetime-local input type in HTML allows users to select both date and time using a built-in date and time picker. This input type creates a form control that displays a calendar and time selector when clicked, making it easy for users to enter accurate date-time values. Syntax Following is the syntax for the datetime-local input type − The value format follows the ISO 8601 standard: YYYY-MM-DDTHH:MM where the T separates the date and time components. Basic Example Following example demonstrates how to use the datetime-local input type in a form ...
Read MoreExecute a script when a mouse pointer moves out of an element in HTML?
The onmouseout attribute in HTML triggers when the mouse pointer moves away from an element. This event is commonly used for interactive effects like changing colors, hiding tooltips, or resetting element states when the user moves their cursor away. Syntax Following is the syntax for the onmouseout attribute − Content The script can be a JavaScript function call or inline JavaScript code that executes when the mouse pointer leaves the element. Basic Example Following example demonstrates the onmouseout event changing text color when the mouse leaves the heading − ...
Read MoreHTML DOM Input Button form Property
The HTML DOM Input Button form property returns a reference to the form element that contains the input button. This property is read-only and provides access to the parent form of a button element, enabling you to identify which form the button belongs to and access form-level properties or methods. Syntax Following is the syntax for accessing the form property − buttonElement.form Return Value The form property returns a reference to the element that contains the button. If the button is not inside a form, it returns null. Example − Basic ...
Read MoreHTML DOM Input DatetimeLocal readOnly Property
The HTML DOM Input DatetimeLocal readOnly property sets or returns whether a datetime-local input field can be modified by the user. When set to true, the input field becomes read-only and cannot be edited, though it remains focusable and its value can still be selected and copied. Syntax Following is the syntax for getting the readOnly property − inputDatetimeLocalObject.readOnly Following is the syntax for setting the readOnly property − inputDatetimeLocalObject.readOnly = booleanValue Parameters The booleanValue parameter accepts the following values − Value Description ...
Read MoreExecute a script when the browser starts to work online in HTML?
The ononline event attribute in HTML executes a JavaScript function when the browser detects that it has regained internet connectivity. This event is fired when the browser transitions from offline to online mode, making it useful for handling network state changes in web applications. Syntax Following is the syntax for the ononline attribute − The ononline attribute is typically used on the element and calls a JavaScript function when the browser goes online. How It Works The browser monitors network connectivity and fires the online event when: The ...
Read MoreHTML DOM Input Button Object
The HTML DOM Input Button Object represents an HTML input element with the type attribute set to "button". This object provides programmatic access to button elements, allowing you to create, modify, and interact with buttons dynamically using JavaScript. The Input Button Object is used to create interactive buttons that can trigger JavaScript functions when clicked. Unlike submit buttons, these buttons do not automatically submit forms but instead execute custom JavaScript code. Syntax Following is the syntax to create an Input Button Object dynamically − var newButton = document.createElement("INPUT"); newButton.setAttribute("type", "button"); To access an ...
Read MoreHTML DOM Input DatetimeLocal required Property
The HTML DOM Input DatetimeLocal required property determines whether a datetime-local input field must be filled out before submitting a form. When set to true, the browser will prevent form submission if the field is empty and display a validation message. Syntax Following is the syntax for getting the required property value − inputDatetimeLocalObject.required Following is the syntax for setting the required property − inputDatetimeLocalObject.required = booleanValue Return Value The property returns a boolean value − true − The datetime-local field is required and must be filled ...
Read MoreHow to use search input type in HTML?
The search input type in HTML is a specialized form control designed for search functionality. It creates a text field that behaves like a regular text input but is semantically identified as a search field, allowing browsers to provide enhanced features like search history and styling optimizations. Syntax Following is the basic syntax for the search input type − The search input can be enhanced with various attributes like placeholder, value, required, minlength, maxlength, and spellcheck. Basic Search Input The search input appears similar to a text input but may display ...
Read More