📅  最后修改于: 2022-03-11 15:01:44.641000             🧑  作者: Mango
var myText = document.createElement('p');
document.body.append(myText);
var seconds = 0;
setInterval(myFunction, 1000);
function myFunction() {
p.innerText = seconds.toString();
seconds++;
}