📌  相关文章
📜  设置值输入日期javascript代码示例

📅  最后修改于: 2022-03-11 15:04:10.258000             🧑  作者: Mango

代码示例1
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;