Removechild (a) est utilisé pour supprimer les éléments existants du document
Paramètre A: le nœud à déplacer
La copie de code est la suivante:
<div id = "guodiv">
<span> 1 </span>
<span> 2 </span>
<span> 3 </span>
</div>
var odiv = document.getElementById ("guodiv");
var FIRSCHILD = ODIV.FirstelementChild?
var returnNode = odiv.reMovechild (FIRSCHILD);
alerte (returnnode.innerhtml);
var lastchild = odiv.lastelementChild?
returnNode = ODIV.RemoveChild (LastChild);
alert (returnnode.innerhtml); // 3