The difference between 'innerHTML' and 'appendChild'
问题 Watching the number of nodes in Chrome DevTools, I'm wondering what the difference in the dom tree after clicking Button1 and it after clicking Button2. index.html <html> <head> <script src="./js/main.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="style/default.css"> </head> <body> <div id="buttons"> <div class="button" id="button1">Execute1</div> <div class="button" id="button2">Execute2</div> </div> <div id="main"></div> <div id="main2"></div> </body> <