.html() and .append() without jQuery

前端 未结 6 1969
野趣味
野趣味 2020-12-05 09:34

Can anyone tell me how can I use these two functions without using jQuery?

I am using a pre coded application that I cannot use jQuery in, and I need to take HTML fr

6条回答
  •  不知归路
    2020-12-05 10:11

    Few years late to the party but anyway, here's a solution:

    document.getElementById('your-element').innerHTML += "your appended text";
    

    This works just fine for appending html to a dom element.

提交回复
热议问题