javascript code to add items in dom
<body>
<label>Input:</label>
<input type="text" id="myInput">
<button onclick="add_Item()">ADD ITEMS</button>
<div id="items"></div>
</body>
<script>
function add_Item(){
var inpt=document.getElementById("myInput");
var para=document.createElement("p");
para.textContent=inpt.value;
var parent=document.getElementById("items");
parent.appendChild(para);
inpt.value="";
}
</script>