remove all
  • from
      ?
  • 后端 未结 7 997
    北荒
    北荒 2020-12-15 02:48

    I am appending li in a ul using the following code:

    for (var i = 1; i <= len; i++) {
        li = document.createElement(\'li\');
    
              
    
    
            
    相关标签:
    7条回答
    • 2020-12-15 03:42

      You can how use replaceChildren() to accomplish this:

      root.replaceChildren();
      
      0 讨论(0)
    提交回复
    热议问题