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 KeyboardEvent charCode Property
The KeyboardEvent charCode property returns the Unicode character code of the character that was pressed during a keyboard event. It provides a numeric representation of the character, which can be useful for character validation and input processing. Note − The charCode property is deprecated. Use the key property instead for modern applications, as it provides more accurate and readable results. Syntax Following is the syntax for accessing the charCode property − event.charCode Return Value The charCode property returns a number representing the Unicode character code of the pressed key. For non-character keys ...
Read MoreHTML DOM Input Password form Property
The HTML DOM Input Password form property is used for returning the form reference that contains the input password field. If the input password field is outside the form then it will simply return null. This property is read-only. Syntax Following is the syntax for input password form property − passwordObject.form Return Value The form property returns one of the following values − Form object − A reference to the form element that contains the password input field. null − If the password input field is not contained ...
Read MoreHow to make an empty div take space?
Making an empty div take up space on a web page is a common requirement in HTML layouts. By default, an empty div has no visible dimensions because it contains no content. However, there are several methods to force an empty div to occupy visual space using CSS properties. Why Empty Divs Don't Take Space An empty div element without content has zero height and only takes up the width of its container by default. To make it visible and occupy space, we need to explicitly define its dimensions using CSS properties like height, width, or add content ...
Read MoreHTML DOM KeyboardEvent code Property
The KeyboardEvent code property in HTML DOM returns a string representing the physical key that was pressed during a keyboard event. Unlike the key property which returns the logical key value, the code property represents the actual physical key location on the keyboard, making it useful for game controls and applications that need to detect specific key positions regardless of keyboard layout. Note − The code property is layout-independent, while the key property reflects the actual character typed. Use key for text input and code for physical key detection. Syntax Following is the syntax for accessing the ...
Read MoreDifference between normal links and active links
The hyperlinks, which are also known as links, are crucial components in websites nowadays. These are clickable and can be used to navigate between source webpage to different pages or the sections in the same webpage. In most of the websites, the links will appear as underlined and differently colored. Links are categorized into the following types − Unvisited Links − Links that haven't been clicked yet Visited Links − Links that have been clicked previously Active Links − Links currently being interacted with (mouse pressed down) Let's discuss about the links mentioned above with ...
Read MoreHow to use month input type in HTML?
The month input type in HTML provides users with a month and year selection control. Using , you can create a form field that allows users to pick a specific month and year from a calendar-like interface. The month input control displays the selected value in YYYY-MM format, where YYYY represents the year and MM represents the month. This input type is particularly useful for forms requiring date ranges, event scheduling, or any scenario where only month and year precision is needed. Syntax Following is the basic syntax for the month input type − ...
Read MoreHTML DOM Input Button name Property
The HTML DOM name property is used to get or set the value of the name attribute of an input button element. This property is essential for form data submission, as the name attribute identifies the button when the form is submitted to the server. Syntax Following is the syntax for returning the name value − object.name Following is the syntax for setting the name value − object.name = "text" Here, text represents the new name value to be assigned to the input button. Return Value The name ...
Read MoreHTML DOM Input DatetimeLocal name Property
The HTML DOM Input DatetimeLocal name property gets or sets the value of the name attribute of an element. This property is essential for form submissions, as it determines the field name sent to the server when the form data is submitted. Syntax Following is the syntax to get the name property − inputDatetimeLocalObject.name Following is the syntax to set the name property − inputDatetimeLocalObject.name = "string" Return Value The name property returns a string representing the value of the name attribute. If no name attribute is set, ...
Read MoreHow to use time input type in HTML?
The time input type in HTML allows users to select time values through a user-friendly interface. This input type creates a time picker control that displays hours and minutes, and optionally seconds, in a standardized format. The time input is created using and displays time in 24-hour format by default. Users can select hours (0-23), minutes (0-59), and optionally seconds (0-59) through an interactive time picker interface. Syntax Following is the basic syntax for the time input type − The time value follows the format HH:MM for hours and minutes, or ...
Read MoreExecute a script when a mouse wheel is being scrolled over an element in HTML?
When a mouse wheel is being scrolled over an element, the onwheel attribute triggers a JavaScript function. This event is useful for creating interactive elements that respond to scroll gestures, such as image galleries, zoom controls, or custom scroll behaviors. Syntax Following is the syntax for the onwheel attribute − Content The onwheel attribute can be used with any HTML element. The event object contains information about the scroll direction and delta values. Basic Mouse Wheel Event Example Following example shows how to execute a script when a mouse wheel is ...
Read More