1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| <script type="text/javascript">
var ide=0;
function newid(idd)
{
ide=idd;
}
function effacerchamp(id)
{
document.getElementById(id).parentNode.removeChild(document.getElementById(id));
document.getElementById("img"+id).parentNode.removeChild(document.getElementById("img"+id));
}
function ajouteInput()
{
var parent = document.getElementById("log");//conteneur
var input = document.createElement("input");//le input
var imag = document.createElement("img");//on ajoute un checkbox pour la suppression
var br = document.createElement("br");//un retour à la ligne
imag.src="http://132.207.28.122/magnu/Admin/images/supprimer.gif";
input.type= "text";//type de l'input
input.id="logiciel"+ide;
imag.onclick=function(){effacerchamp(ide)};
imag.id=ide;
input.name = "logg"+ide;
parent.appendChild(input);
parent.appendChild(imag);
parent.appendChild(br);
ide++;
}
</script> |