26
รับวันที่และเวลาปัจจุบันใน JavaScript
ฉันมีสคริปต์ที่พิมพ์วันที่และเวลาปัจจุบันใน JavaScript แต่DATEผิดเสมอ นี่คือรหัส: var currentdate = new Date(); var datetime = "Last Sync: " + currentdate.getDay() + "/" + currentdate.getMonth() + "/" + currentdate.getFullYear() + " @ " + currentdate.getHours() + ":" + currentdate.getMinutes() + ":" + currentdate.getSeconds(); ควรพิมพ์18/04/2012 15:07:33และพิมพ์3/3/2012 15:07:33 ความช่วยเหลือใด ๆ ขอบคุณ