Trying to set the value of a text box using javascript the value displays on the web page but doesn't seem to display in the text box Below is the code snippet. Appreciate some help.
var d = new Date();
var dd = d.getDate();
var mm = d.getMonth()+1;
var yyyy = d.getFullYear();
today = yyyy+""+mm+""+dd;
document.getElementById("demo").innerHTML = d.getTime();
document.getElementById("demotime").innerHTML = today;
document.getElementById("demotime").value = today;
<html>
<body>
<h2>JavaScript getTime()</h2>
<p id="demo"></p>
<p id="demotime"></p>
<form>
<input type="text" id="demotime" />
</form>
</body>
</html>