📜  在javascript代码示例中获取当前时间

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

代码示例6
var d = new Date();
var n = d.toLocaleTimeString();
document.getElementById("timer").innnerHTML = n;