<script language="JavaScript" type="text/JavaScript"> var nr = 1; function addItem(cloneMode) { var list = document.getElementById("list"); var oldItem = list.firstChild; var newItem = oldItem.cloneNode(cloneMode); list.appendChild(newItem); } </script> <ul id="list"><li><a href="http://www.w3mentor.com/"> Item 1</a></li></ul> <input type="button" onclick="addItem(true);" value="Clone all" /> <input type="button" onclick="addItem(false);" value="Clone node only" />
Continue reading...
Continue reading...