1
Some time ago I asked a question about how to clone a form DIV when clicking a button ( + )...
I got the following answer that helped me at the time.
Now, I need to add a new button ( - ) so that when the user clicks, the cloned div is removed.
Current JS code:
Drawn up by: Sergio
function mais() {
var destino = document.getElementById("aqui");
var novadiv = document.createElement("div");
var conteudo = document.getElementById("servico");
novadiv.innerHTML = conteudo.innerHTML;
destino.appendChild(novadiv);
}
I need help to implement a Function that does the following:
function menos(){
//remove ultima div clonada...
}
jsFiddle: jsfiddle.net/qf2Lf914/
Exactly what I needed, thank you very much!
– Charles Fay