Error: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'

前端 未结 5 1616
孤街浪徒
孤街浪徒 2020-11-27 11:57

I am trying to drag and drop an image on a div. The image does not get get dragged onto the div and gives the following error

Uncaught TypeError: Failed to e         


        
5条回答
  •  时光取名叫无心
    2020-11-27 12:25

    You may also use element.insertAdjacentHTML('beforeend', data);

    Please read the "Security considerations" on MDN.

提交回复
热议问题