HTML 5
HTML 5
HTML 5
• <!DOCTYPE HTML>
<html>
<head>
<script>
function allowDrop(ev) {
ev.preventDefault();
}
• function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
}
• </script>
• </head>
• <body>
<div id="div1" ondrop="drop(event)" ondragover="all
owDrop(event)"></div>
<img id="drag1" src="img_logo.gif" draggable="true"
ondragstart="drag(event)" width="336" height="69">
</body>
</html>
Offline web applications
• offline web application feature is really useful
for allowing your site’s users to work with the
resources which don’t require network
connectivity like HTML, image, CSS, JavaScript,
media files and other resources.
Cache manifest file and the caching mechanism