Web Development Articles

Page 20 of 801

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 256 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

HTML Location assign( ) Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 235 Views

The HTML Location assign() method loads a new document at the specified URL. Unlike setting window.location.href directly, this method explicitly adds an entry to the browser's history, allowing users to navigate back to the previous page using the back button. Syntax Following is the syntax for the Location assign() method − location.assign(URL) Parameters The method accepts the following parameter − URL − A string representing the absolute or relative URL of the page to navigate to. Return Value This method does not return any value. It performs navigation ...

Read More

HTML onafterprint Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 140 Views

The HTML onafterprint event attribute is triggered when a page has started printing or if the print dialog box has been closed in the HTML document. This event is useful for restoring page styles or displaying messages after the print operation is completed. Syntax Following is the syntax for the onafterprint event attribute − The script parameter contains JavaScript code or a function call that executes after printing occurs. Parameters The onafterprint event attribute accepts the following parameter − script − A JavaScript function or code that runs when ...

Read More

HTML ononline Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 186 Views

The HTML ononline event attribute is triggered when the browser detects that the device has regained an internet connection. This event is useful for applications that need to respond when network connectivity is restored, such as syncing data or updating the user interface. Syntax Following is the syntax for the ononline event attribute − Content The script parameter can be a JavaScript function call or inline JavaScript code that executes when the online event is triggered. How It Works The ononline event is fired on the element when the browser's navigator.onLine ...

Read More

HTML onpageshow Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 162 Views

The HTML onpageshow event attribute is triggered when a user navigates to a webpage. This event fires every time the page is loaded, including when the page is loaded from the browser's cache (back/forward navigation). It is particularly useful for detecting when a page becomes visible to the user. Syntax Following is the syntax for the onpageshow event attribute − The script parameter contains JavaScript code or a function call that executes when the page is shown to the user. Key Features The onpageshow event has several important characteristics − ...

Read More

HTML ondrop Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 191 Views

The HTML ondrop event attribute is triggered when a draggable element or text is dropped on a valid drop target in an HTML document. This event is part of the HTML5 drag and drop API, which enables interactive user interfaces where elements can be moved between different areas of a webpage. Syntax Following is the syntax for the ondrop event attribute − Where script is the JavaScript code to execute when the drop event occurs. Parameters The ondrop event handler receives an event object with the following key properties − ...

Read More
Showing 191–200 of 8,010 articles
« Prev 1 18 19 20 21 22 801 Next »
Advertisements