insert/remove HTML content between div tags

后端 未结 7 1954
渐次进展
渐次进展 2020-12-30 01:22

how can I insert some HTML code between

...
using javascript?

Ex:

7条回答
  •  生来不讨喜
    2020-12-30 01:54

    // Build it using this variable
    var content = "....content...."; 
    // Insert using this:
    document.getElementById('mydiv').innerHTML = content;
    

提交回复
热议问题