
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>chenhao </title> </head> <body> <ul id="list"> <li> Pommes </li> <li> Bananes </li> </ul> <ul id="op"> </ul> <button >Commande - moi</button> <script> var btn=document.querySelector('button'); btn.onclick=function() { var item=document.getElementById('lsit').firstChild; var clone=item[0].cloneNode(true); document.getElementById('op').appendChild(cloneItem); } </script> </body></html>
listMauvaise orthographe.
- Oui.list

var btn=document.querySelector('button'); btn.onclick=function() { var item=document.getElementById('list').firstChild; var clone=item.cloneNode(true); document.getElementById('op').appendChild(cloneItem); }