📅  最后修改于: 2022-03-11 15:04:10.258000             🧑  作者: Mango
var date = new Date();
var currentDate = date.toISOString().substring(0,10);
var currentTime = date.toISOString().substring(11,16);
document.getElementById('currentDate').value = currentDate;
document.getElementById('currentTime').value = currentTime;