I have a label in the form of my site that adds to a div
(in the example case, id
of this div
is grupoExt
) an HTML content. Here is the code:
var numeroFE = 2;
$("#addFE").click(function(){
var html3 = "<div class='BoxForm1'>";
html3 += "<div class='inputMGM'><input name='nomeFE"+numeroFE+"' id='' class='validate[required]' title=''></input></div></div>";
html3 += "<div class='BoxForm2'>";
html3 += "<div class='inputMGM'><input name='empresaFE"+numeroFE+"' id='' class='validate[required]' title=''></input></div></div>";
$('#grupoExt').append(html3);
document.getElementById('grupoExt_text').value=numeroFE;
numeroFE++;
});
I wonder if it's possible to do otherwise. That is, using JavaScript code to remove this code added to div
grupoExt