Typo, it's newLI
, not newLi
<script type="text/javascript">
function addToList()
{
var doc = document.getElementById("myList");
var newLI = document.createElement("li");
var input = document.createElement("input");
input.type = "text";
input.size = "60";
newLI.appendChild(input); // typo here, it's not newLi
doc.appendChild(newLI);
}
</script>