Is there any major difference between innerHTML and using createTextNode to fill a span?

前端 未结 3 1648
攒了一身酷
攒了一身酷 2020-12-05 10:11

The title is pretty clear: Is there any major difference between innerHTML and createTextNode (used with Append) to fill a span with t

3条回答
  •  死守一世寂寞
    2020-12-05 10:43

    My understanding is that certain manipulations of innerHTML remove all bound events, so using createTextNode is preferable.

提交回复
热议问题