tiingshii
08-25-2009, 10:22 AM
hi ppl~
im trying to have the date inside the input text but i cnt get it to work... anyone can help? or is there any other way to have the date inside a box?
<html>
<body>
<input type="text" name="ShoesSize2" size="35">
<script type="text/javascript">
var d = new Date();
var e=new Date();
var f = new Date()
var month=new Array(12);
month[0]="1";
month[1]="2";
month[2]="3";
month[3]="4";
month[4]="5";
month[5]="6";
month[6]="7";
month[7]="8";
month[8]="9";
month[9]="10";
month[10]="11";
month[11]="12";
document.write(d.getDate() + "/");
document.write(month[e.getMonth()]+ "/");
document.write(f.getYear());
</script>
</body>
</html>
im trying to have the date inside the input text but i cnt get it to work... anyone can help? or is there any other way to have the date inside a box?
<html>
<body>
<input type="text" name="ShoesSize2" size="35">
<script type="text/javascript">
var d = new Date();
var e=new Date();
var f = new Date()
var month=new Array(12);
month[0]="1";
month[1]="2";
month[2]="3";
month[3]="4";
month[4]="5";
month[5]="6";
month[6]="7";
month[7]="8";
month[8]="9";
month[9]="10";
month[10]="11";
month[11]="12";
document.write(d.getDate() + "/");
document.write(month[e.getMonth()]+ "/");
document.write(f.getYear());
</script>
</body>
</html>