xxxxxxxxxx
<form action="/signup" method="post" id="signup">
</form>
Code language: HTML, XML (xml)
xxxxxxxxxx
const form = document.createElement('form');
const input = document.createElement('input');
input.type = 'text';
input.name = 'name';
input.placeholder = 'Enter your name';
const button = document.createElement('button');
button.type = 'submit';
button.textContent = 'Submit';
form.appendChild(input);
form.appendChild(button);
document.body.appendChild(form);