help

help

help

help make sure that when you click New Question, the Question block is copied below JS HTML

  • The code should be laid out in the form of text and not screenshots. Please - Alexey Shimansky

1 answer 1

document.querySelector('button').addEventListener('click', () => { var ddd = document.querySelector('.qqq').cloneNode(true); document.body.insertBefore(ddd, document.querySelector('button')); }) 
 * { margin: 0; padding: 0; } html, body { width: 100%; height: 100%; background: #272727; } div { color: white } 
 <div class="qqq"><input type="text" placeholder="Имя"><input type="text" placeholder="фамилия"></div> <button>добавить</button>