+ 2
a program to display date in dd/mm/yyyy format in javascript? And the other one in mm/dd/yyyy format
just simple program eg (26/ jan/ 2018) only format in bracket to be the output
2 Réponses
+ 2
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d.toDateString();
</script>
</body>
</html>
output:
fri jan 26 2018
fron ny research i gat that prog but still i dont need (friday) in my output.
0
i get the solution finally tho no reactio lo!
<html>
<head><title></title>
</head>
<body>
<script>
now=new Date();
time=now.getFullYear();
document.write(time);
time1=now.getMonth()+1;
document.write('/'+time1+'/');
time2=now.getDate();
document.write(time2);
</script>
</body>
<h
</html>