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
Front End Technology Articles
Page 20 of 652
HTML Location assign( ) Method
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 MoreHTML onafterprint Event Attribute
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 MoreHTML ononline Event Attribute
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 MoreHTML onpageshow Event Attribute
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 MoreHTML ondrop Event Attribute
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 MoreHTML onmouseup Event Attribute
The HTML onmouseup event attribute is triggered when a mouse button is released from an HTML element. This event occurs after the mouse button has been pressed down and then released, making it useful for implementing interactive click behaviors and drag-and-drop functionality. Syntax Following is the syntax for the onmouseup event attribute − Content Where script is the JavaScript code to execute when the mouse button is released over the element. How onmouseup Works The onmouseup event is part of the mouse event sequence. When you interact with an element using a ...
Read MoreHTML onmousedown Event Attribute
The HTML onmousedown event attribute is triggered when a mouse button is pressed down on an HTML element. This event fires immediately when the user presses any mouse button (left, right, or middle) while the cursor is over the element, before the button is released. Syntax Following is the syntax for the onmousedown event attribute − Where script is the JavaScript code to execute when the mouse button is pressed down on the element. Parameters The onmousedown event attribute accepts the following parameter − script − JavaScript code or ...
Read MoreHTML onmousemove Event Attribute
The HTML onmousemove event attribute is triggered when the user moves the mouse pointer over an HTML element. This event fires continuously while the mouse is in motion over the target element, making it useful for tracking cursor movement and creating interactive hover effects. Syntax Following is the syntax for the onmousemove event attribute − Where script is the JavaScript code to execute when the mouse moves over the element. Parameters The onmousemove event attribute accepts the following parameter − script − JavaScript code or function call to execute ...
Read MoreHTML onmouseout Event Attribute
The HTML onmouseout event attribute is triggered when the mouse pointer moves out of an HTML element. This event is commonly used to reset styles, hide tooltips, or perform cleanup actions when users move their cursor away from an element. Syntax Following is the syntax for the onmouseout event attribute − Content Where script is the JavaScript code to execute when the mouse leaves the element. Parameters script − JavaScript code or function call that executes when the mouse pointer moves out of the element. Example − Circle Color ...
Read MoreHTML onmouseover Event Attribute
The HTML onmouseover event attribute is triggered when the mouse pointer moves over an HTML element. This event is commonly used to create interactive effects, show tooltips, highlight elements, or change visual appearance when users hover over content. Syntax Following is the syntax for the onmouseover event attribute − Content Where script is the JavaScript code to execute when the mouse enters the element area. Basic Example Following example demonstrates a simple onmouseover event that changes text color when hovering − HTML onmouseover Event ...
Read More