<div id="todo_root">
<ul id="todo">
<li><input type="text" id="input"><button id="submit">Добавить</button></li>
</ul>
</div>
<script>
function createItem() {
var li=document.createElement('li');
li.innerText=element.value;
var ul=document.getElementById('todo');
ul.appendChild(li);
}
var element =document.getElementById("input");
document.getElementById("submit").onclick=createItem;
console.log(element);
</script>
Или так
<div id="todo_root">
<form id="form">
<ul id="todo">
<li><input type="text" id="input"><button id="submit">Добавить</button></li>
</ul>
</form>
</div>
<script>
function createItem() {
var li=document.createElement('li');
li.innerText=element.value;
var ul=document.getElementById('todo');
ul.appendChild(li);
}
var element =document.getElementById("input");
document.getElementById("submit").onclick=createItem;
document.getElementById("form").onsubmit = function() { return false;};
console.log(element);
</script>