
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 8591 Articles for Front End Technology

123 Views
When an element has been dragged in HTML to a valid drop target, the ondragenter attribute fires.ExampleYou can try to run the following code to implement the ondragenter attribute − #boxA, #boxB { float:left;padding:10px;margin:10px; -moz-user-select:none; } #boxA { background-color: #6633FF; width:75px; height:75px; } #boxB { background-color: #FF6699; width:150px; height:150px; } function dragStart(ev) { ev.dataTransfer.effectAllowed = 'move'; ev.dataTransfer.setData("Text", ev.target.getAttribute('id')); ev.dataTransfer.setDragImage(ev.target,0,0); return true; } Drag and drop HTML5 demo Try to drag the purple box around. Drag Me Dustbin

243 Views
The ondurationchange attribute triggers when the length of the audio/ video changes in HTML.ExampleYou can try to run the following code to implement ondurationchange attribute − Your browser does not support the video element. function display(vLength) { alert("Video Length: " + vLength.duration + " seconds"); }

314 Views
When a text selection or draggable element is dropped onto an authorised drop target, the ondrop event is triggered. It is simpler to move an object to a different area by engaging notion of drag and drop. Following are the examples… Example In the following example we are using executing a javascript when the draggable element is dropped in . DOCTYPE HTML> .droptarget { float: left; width: 100px; height: 35px; ... Read More

315 Views
In HTML, user input is obtained via the tag. The min and max properties, which indicate a maximum and minimum value for an input field, are used to limit the input field. Use the maxlength attribute to restrict the number of characters. Syntax Following are the examples… Example In the following example we are using the maxlength attribute with the input type to allow maximum number of elements. DOCTYPE html> style> body { text-align: center; } ... Read More

182 Views
The range in which a gauge's value is regarded as low is specified using the HTML | low property. The low attribute's value must be higher than the "min, " lower than the "max, " and equal to or less than the "high" attribute. Note − This can only be used with tag. Syntax Following are the examples… Example In the following example we are using the low attribute in the tag. DOCTYPE html> MSD score: 5 out of 10 ... Read More