<!DOCTYPE html>
<html>
<head>
<title>Javascript</title>
</head>
<body>
<input type="text" placeholder="Add" id="myvalue"/>
<button type="submit" onclick="myfunction()">Add</button>
<p id="demo"></p><br>
</body>
<script>
function myfunction(){
document.getElementById("demo").innerHTML += document.getElementById("myvalue").value +"<br/>";
}
</script>
</html>