
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 57 Articles for DOM

86 Views
The HTML ondragstart event attribute is triggered when the user begin to drag an HTML element or text of an element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML ondragstart event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .drop-target { display: inline-block; width: 150px; height: 150px; border: 2px solid ... Read More

143 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.SyntaxFollowing is the syntax −Let us see an example of HTML ondrop event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .drop-target { display: inline-block; width: 150px; height: 150px; border: 2px solid #FFF; ... Read More

77 Views
The HTML ondragleave event attribute is triggered when a draggable element or text exit a valid drop target in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML ondragleave event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .drop-target { display: inline-block; width: 150px; height: 150px; border: 2px solid #FFF; ... Read More

103 Views
The HTML ondragend event attribute is triggered when the user finished dragging an element or text of an HTML element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML ondragend event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .drop-target { display: inline-block; width: 150px; height: 150px; border: 2px solid #FFF; ... Read More

120 Views
The HTML onpageshow event attribute is triggered when a user navigates to a webpage.SyntaxFollowing is the syntax −Let us see an example of HTML onpageshow event Attribute−Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } HTML onpageshow Event Attribute Demo function showFn() { alert("Hey! you are on homepage"); } OutputClick on “ok” button of alert box to show the content of the HTML document.

123 Views
The HTML ononline event attribute is triggered when the browser starts to work online.SyntaxFollowing is the syntax −Let us see an example of HTML ononline event Attribute−Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .show { font-size: 1.2rem; color: #fff; } HTML onoffline/ononline Event Attribute Demo Try to disable/enable your network. function onlineFn() { alert("Hey! You are online"); } function offlineFn() { alert("Hey! You are offline"); } OutputNow try to enable/disable your network to observe how onoffline/ononline event attribute works−

122 Views
The HTML onoffline event attribute is triggered when the browser starts to work offline.SyntaxFollowing is the syntax −Let us see an example of HTML onoffline event Attribute−Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } .show { font-size: 1.2rem; color: #fff; } HTML onoffline/ononline Event Attribute Demo Try to disable/enable your network. function onlineFn() { alert("Hey! You are online"); } function offlineFn() { alert("Hey! You are offline"); } OutputNow try to enable/disable your network to observe how onoffline/ononline event attribute works−

254 Views
The HTML onload event attribute is triggered when an object has been loaded in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onload event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } function get() { alert("Hi! you just refresh the document."); } HTML onload Event Attribute Demo Now try to refresh this document. OutputNow try to reload the document to observe how onload event attribute works.

113 Views
The HTML onbeforeprint event attribute is triggered when a page is about to be printed or before the print dialog box appears in the HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onbeforeprint event Attribute−Example Live Demo body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } p { font-size: 1.1rem; } HTML onbeforeprint Event Attribute Demo ... Read More

344 Views
The HTML form method attribute defines how to send form-data that means to be sent as URL variable or to be sent as an HTTP post transaction.SyntaxFollowing is the syntax −Here get sends the form data as URL variable and post sends the form data as an HTTP post transaction.Let us see an example of HTML Form method Attribute−Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) no-repeat; text-align: center; } input { width: 315px; ... Read More