12
I have assembled the following structure in HTML:
<form name="criaModelo" method='post' action=''>
<label for="name">
<strong>Nome:</strong>
<input name="nomeModelo" type="text">
</label>
<h2>Associando Instruções</h2>
<img src="images/4.png" class="btnNewInst btnHover" title="Inserir nova instrução" />
<label for="criaAssoc" class="instAssoc">
<strong>ID:</strong>
<input type="text">
<strong>Ordem:</strong>
<input type="text">
<span>
<strong class="instTxt">Instrução:</strong>
<textarea disabled="disabled"></textarea>
</span>
</label>
<h2>Associando Tempo</h2>
<img src="images/4.png" class="btnNewTime btnHover" title="Inserir nova instrução" />
<label class="time">
<strong>ID:</strong>
<input type="text" style="width:25px;">
<div>
<strong>Total:</strong>
<span>12:12:12</span>
<strong class="margem">Tipo:</strong>
<span>visível</span>
<strong class="margem">Momento:</strong>
<span>12:12:12</span>
<strong class="margem">Ordem:</strong>
<span>Crescente</span>
</div>
</label>
<input type="submit" name="btnCriaModelo" class="newbtn" value="Criar">
</form>
Which has the following result:
I wanted to click on this button to add to the form
after the last current element of this HTML to create a new label
as above.
<label for="criaAssoc" class="instAssoc">
<strong>ID:</strong>
<input type="text">
<strong>Ordem:</strong>
<input type="text">
<span>
<strong class="instTxt">Instrução:</strong>
<textarea disabled="disabled"></textarea>
</span>
</label>
You can use the append of jQuery http://api.jquery.com/append/
– Robson Ventura Rodrigues