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 247 of 840
HTML onkeydown Event Attribute
The HTML onkeydown event attribute is triggered when a user presses a key on the keyboard. This event fires at the moment a key is pressed down, before the key is released. It is commonly used for capturing keyboard input, creating keyboard shortcuts, and implementing real-time text processing. The onkeydown event occurs in the following sequence: onkeydown → onkeypress → onkeyup. The onkeydown event fires for all keys including function keys, arrow keys, and special keys like Escape or Tab. Syntax Following is the syntax for the onkeydown event attribute − Content Where ...
Read MoreHTML onkeyup Event Attribute
The HTML onkeyup event attribute is triggered when a user releases a key on the keyboard. This event occurs after the onkeydown and onkeypress events, making it useful for capturing the final state of user input after a key has been completely processed. The onkeyup event is commonly used for real-time input validation, live search functionality, character counting, and dynamic content updates as users type. Syntax Following is the syntax for the onkeyup event attribute − Content Where script is the JavaScript code to execute when the key is released. This can be ...
Read MoreHTML onkeypress Event Attribute
The HTML onkeypress event attribute is triggered when the user presses a key on the keyboard while focused on an element. This event is commonly used for input validation, real-time text processing, and creating interactive web forms. Syntax Following is the syntax for the onkeypress event attribute − Content Where script is the JavaScript code to execute when a key is pressed. Parameters The onkeypress event attribute accepts the following parameter − script − JavaScript code or function to execute when the keypress event is triggered. Event Object ...
Read MoreHTML Window alert( ) Method
The HTML window alert() method displays a simple alert dialog box with a specified message and an OK button. This method is part of the JavaScript Window object and provides a way to show important information or notifications to users that require acknowledgment before continuing. Syntax Following is the syntax for the window alert() method − alert(message); Parameters The alert() method accepts one parameter − message − A string that specifies the text to display in the alert dialog box. If a non-string value is passed, it will be converted to ...
Read MoreHTML Window atob( ) Method
The HTML window atob() method is used to decode a Base64 encoded string. It is the counterpart to the btoa() method, which encodes strings into Base64 format. The atob stands for "ASCII to Binary" and converts Base64 encoded data back to its original string format. Syntax Following is the syntax for the atob() method − window.atob(encodedString) Parameters The atob() method accepts one parameter − encodedString − A Base64 encoded string that needs to be decoded. This must be a valid Base64 string, otherwise the method will throw a DOMException. ...
Read MoreHTML DOM TransitionEvent elapsedTime Property
The HTML DOM TransitionEvent elapsedTime property returns a floating-point number representing the duration in seconds that a CSS transition has been running when a transition event is fired. This property is particularly useful for monitoring and debugging CSS transitions or creating animations with precise timing. Syntax Following is the syntax to access the elapsedTime property − transitionEvent.elapsedTime Return Value The elapsedTime property returns a double representing the number of seconds the transition has been running. This value excludes any time the transition was paused. Example − Basic Transition Timing Following example ...
Read MoreHTML table with 100% width, with vertical scroll inside tbody
Creating an HTML table with 100% width and vertical scroll inside the allows you to display large datasets while keeping the header fixed and maintaining the table's full width. This is particularly useful for displaying long lists of data in a constrained space. Syntax The key CSS properties for creating a scrollable tbody are − table thead, table tbody { display: block; } table tbody { height: [fixed-height]; overflow-y: auto; overflow-x: hidden; } The display: block property converts the table ...
Read MoreHTML DOM del dateTime Property
The HTML DOM del dateTime property is associated with the HTML element and specifies when text content was deleted from the document. This property corresponds to the datetime attribute and provides a machine-readable timestamp indicating the date and time of deletion. Syntax Following is the syntax for setting the dateTime property − delObject.dateTime = "YYYY-MM-DDThh:mm:ssTZD" Following is the syntax for getting the dateTime property − var dateTimeValue = delObject.dateTime Parameters The dateTime property accepts a string value in the following format − YYYY − Four-digit year ...
Read MoreHTML novalidate Attribute
The HTML novalidate attribute specifies that form data should not be validated when the form is submitted. This boolean attribute disables the browser's built-in validation for form controls like required, pattern, min, max, and input type validations. Syntax Following is the syntax for the novalidate attribute − The novalidate attribute is a boolean attribute, meaning its presence alone enables the functionality. You can write it as novalidate, novalidate="", or novalidate="novalidate". How It Works When the novalidate attribute is present on a form element, the browser skips ...
Read MoreHTML DOM Del object
The HTML DOM Del object represents the element in the DOM. The element is used to mark text that has been deleted from a document, typically displayed with a strikethrough style. The Del object provides properties and methods to create, access, and manipulate elements programmatically using JavaScript. Syntax Following is the syntax for creating a Del object − var delElement = document.createElement("DEL"); To access an existing element − var delElement = document.getElementById("delId"); Properties The Del object supports the following specific properties − ...
Read More