<html>
<body>
<p>Click the button to create a Hidden Input Field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.createElement("INPUT");
x.setAttribute("type", "hidden");
document.body.appendChild(x);
document.getElementById("demo").innerHTML = "The Hidden Input Field was created. However, you are not able to see it because it is hidden (not visible).";
}
</script>
</body>
</html>