Source code

Revision control

Other Tools

<?xml version="1.0" encoding="utf-8"?>
<head>
<title>PNG image drag and drop: changing draggable attribute</title>
<style type="text/css">
img
{width:100px;
height:100px;}
</style>
</head>
<body onload="document.querySelector('img').setAttribute('draggable','false')">
<p><img ondragstart="document.querySelector('p').firstChild.nodeValue = 'FAIL'" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEElEQVR42mNgaGD4D8YwBgAw9AX9Y9zBwwAAAABJRU5ErkJggg==" alt="PNG green pixel"/></p>
<p>You should not be able to drag green box.</p>
</body>
</html>