Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.draganddrop.html:20 dropdraganddrop.html:26 ondrop
< /code>
code
< /p>
Creativity Dashboard
[*]
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));
}
/* Overall & panel width defined using css in MovingBoxes version 2.2.2+ */
#slider-one {
width: 1003px;
}
#slider-one>li {
width: 150px;
}

ondragstart="drag(event)" alt="picture">-

ondragstart="drag(event)" alt="picture"> -

ondragstart="drag(event)" alt="picture"> -

ondragstart="drag(event)" alt="picture"> -

ondragstart="drag(event)" alt="picture"> -

ondragstart="drag(event)" alt="picture" id="astronaut"> -

ondragstart="drag(event)" alt="picture">


alt="picture" draggable="true" ondragstart="drag(event)">


alt="picture">
Подробнее здесь: https://stackoverflow.com/questions/270 ... of-type-no
Мобильная версия