+ 2
how drag and drop functions work and implemented
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>
1 Resposta
0
This should help
https://www.w3schools.com/html/html5_draganddrop.asp