const input = document.getElementById('field')const button = document.getElementById('btn')const text = document.getElementById('text')const removeBtn = document.getElementById('remove-btn')button.addEventListener('click', () => { if (input.value.length === 0) { return } text.insertAdjacentHTML('beforeend', ` ${input.value}
${input.value}
HTML:
<div class="container">
<form class="form">
<input id="field" type="text" class="input" placeholder="Введите текст">
<input id="btn" type="button" value="Нажать">
<div id="text">
<!-- <div class="block">
<p></p>
<input id="remove-btn" class="cross" type="button" value="x">
</div> -->
</div>
</form>
</div>
JS: