1
I have a small form for phone registration, and I want the user to be able to click the "Add new phone" button and an identical copy of the form is created below, so the user can put as many phones as he wants.
And this is HTML:
<div id="divTelefone">
Telefone:<br>
<label for="frmDDD">DDD: </label>
<input type="text" maxlength="2" size="3" id="frmDDD" name="frmDDD" placeholder="xx"></input>
<label for="frmNumero">Número:</label>
<input type="text" id="frmNumero" name="frmNumero" size="20" maxlength="9" placeholder="Somente números"></input><br><br>
<label for="frmOperadora">Operadora Telefone:</label>
<select id="frmOperadora" name="frmOperadora">
<option value="0">-----</option>
<option value="VV">Vivo</option>
<option value="CL">Claro</option>
<option value="TM">Tim</option>
<option value="OI">Oi</option>
<option value="NX">Nextel</option>
<option value="AL">Algar</option>
<option value="SE">Sercomtel</option>
<option value="MV">MVNO's </option>
</select>
<label for="frmDescTel">Descrição do telefone:</label>
<input type="text" id="frmDescTel" name="frmDescTel" maxlength="25" size="25" placeholder="ex: trabalho, pessoal..."></input>
</div>
<input type="button" name="frmAddTelefone" id="frmAddTelefone" value="Adicionar outro número" onclick="addTelefone()">
Where is the javascript you have already implemented to generate html?
– Giuliana Bezerra
You use jQuery?
– Sam
I do not use Jquery
– Gabriel GG