+ 1
Please who can explain this code to me
<body> <div id="box" ondrop="drop(event)" ondragover="allowDrop(event)" style="border:1px solid black; width:200px; height:200px"></div> <img id="image" src="sample.jpg" draggable="true" ondragstart="drag(event)" width="150" height="50" alt="" /> </body>
1 Answer
+ 2
What in particular? This represents rectangle and image under it. ondrop and ondragover are event listeners and triggers the function with the name in quotes.