Front End Technology Articles

Page 19 of 652

HTML onerror Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 354 Views

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 More

HTML onkeydown Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 226 Views

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 More

HTML onkeyup Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 234 Views

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 More

HTML onkeypress Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 279 Views

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 More

HTML Navigator appVersion Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 184 Views

The navigator.appVersion property in HTML returns a string containing version information about the browser. This property provides details about the browser's version, platform, and sometimes additional system information. Syntax Following is the syntax for the navigator appVersion property − navigator.appVersion Return Value The navigator.appVersion property returns a string that typically includes − Version number − The browser version information Platform details − Operating system information Engine information − Browser engine details like WebKit or Gecko Note − The format and content of the ...

Read More

HTML Navigator cookieEnabled Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 192 Views

The navigator.cookieEnabled property is a read-only property that returns a boolean value indicating whether HTTP cookies are enabled in the user's browser. This property returns true if cookies are enabled and false if they are disabled. This property is useful for web developers to check cookie support before attempting to set or read cookies, ensuring better user experience and preventing errors in cookie-dependent functionality. Syntax Following is the syntax for the navigator cookieEnabled property − navigator.cookieEnabled Return Value The property returns a boolean value − true − If cookies are ...

Read More

HTML Navigator geolocation Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 175 Views

The navigator.geolocation property in HTML provides access to the Geolocation API, which allows web applications to retrieve the user's current location. This property returns a Geolocation object that contains methods to get the user's position coordinates, track location changes, and handle location-related errors. The geolocation functionality requires user permission and works best with HTTPS connections. Modern browsers will prompt users to allow or deny location access when a website requests it. Syntax Following is the syntax for accessing the navigator geolocation property − navigator.geolocation The geolocation object provides three main methods − ...

Read More

HTML Navigator onLine Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 255 Views

The HTML navigator.onLine property returns a boolean value that indicates whether the browser is currently online or offline. This property is part of the Navigator interface and provides a simple way to check the network connectivity status of the user's browser. Syntax Following is the syntax for the navigator onLine property − navigator.onLine Return Value The navigator.onLine property returns − true − If the browser is online (connected to the internet) false − If the browser is offline (not connected to the internet) Basic Usage Example Following example ...

Read More

HTML Navigator userAgent Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 276 Views

The navigator.userAgent property in HTML returns a string containing the complete user-agent header that the browser sends to web servers. This string contains information about the browser name, version, operating system, and rendering engine, making it useful for browser detection and compatibility checks. Syntax Following is the syntax for the navigator userAgent property − navigator.userAgent Return Value The property returns a string representing the user-agent header. This string typically includes the browser name, version, operating system, and other identifying information that the browser reports to web servers. Example − Basic userAgent Display ...

Read More

HTML Navigator javaEnabled() Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 185 Views

The navigator.javaEnabled() method in JavaScript returns a boolean value indicating whether Java is enabled in the current browser. This method is part of the Navigator interface and provides information about the browser's Java support capabilities. Syntax Following is the syntax for the navigator.javaEnabled() method − navigator.javaEnabled() Parameters This method does not accept any parameters. Return Value The method returns a boolean value − true − If Java is enabled in the browser false − If Java is disabled or not available in the browser Example − Basic ...

Read More
Showing 181–190 of 6,519 articles
« Prev 1 17 18 19 20 21 652 Next »
Advertisements