How does js drag and drop values from the tree into the cells of the table?

use js to achieve the function of dragging and inserting values in the tree structure directly into the cell on the right.
drag and drop is easier to implement, but I don"t know how to get the value to which cell it is dragged to in real time, and how to get a callback after insertion. I don"t know how to solve this problem.

do you have any good ideas and methods to solve the problem?

Aug.10,2021

aren't there drag and drop events? save the tree node data in dragstart, insert it into the corresponding data in drop, and display it on the corresponding cell

.

if you don't use native events very well, use jquery-ui 's draggable and droppable components directly

Menu