0

How i read a date from the user and print it on the screen using js only js .

21st Apr 2017, 11:46 AM
jab
jab - avatar
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
21st Apr 2017, 12:07 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar
+ 1
put it in any tag like: var input = promt(); document.getElementById("output").innerHTML = input
21st Apr 2017, 12:14 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
var now =new Date() document.write(now)
21st Apr 2017, 11:50 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
thank u but yes i want to read the month the day and the year from the user
21st Apr 2017, 12:10 PM
jab
jab - avatar
0
i did with window.promt but how i print it in screen so all the date will appear
21st Apr 2017, 12:10 PM
jab
jab - avatar