<!DOCTYPE html>
<html>
<body>
<p>Type in the text field</p>
<input id="filter" type="text"
placeholder="Enter your filter text here.." onkeyup="test()" />
<div id="lc"></div>
<script>
function test(){
var element = document.createElement("div");
element.appendChild(document.createTextNode('typed'));
document.getElementById('lc').appendChild(element);
}
</script>
</body>
</html>