0
How i read a date from the user and print it on the screen using js only js .
5 Respostas
+ 2
var date_i = prompt()
date_i = new Date (Date.parse(date_i))
alert (date_i.toString("MMM dd")
input format: April, 21 2017
+ 1
put it in any tag like:
var input = promt();
document.getElementById("output").innerHTML = input
0
var now =new Date()
document.write(now)
0
thank u but yes i want to read the month the day and the year from the user
0
i did with window.promt but how i print it in screen so all the date will appear