<!DOCTYPE html>
<html>
<body>
<p>Click the button to create an Input field.</p>
<button id="btn" onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var y = document.createElement("LABEL");
var yv = prompt("Enter Caption value:", "");
y.setAttribute("value", yv);
document.body.appendChild(y);
}
</script>
</body>
</html>
I want to create 'lebel' using the above code. it's not working. plz help...