我想重复一段代码来每3秒重复一次,这是我到目前为止所尝试的:
function saveEdits() {
var editElem = document.getElementById("edit");
var userVersion = editElem.innerHTML;
localStorage.userEdits = userVersion;
document.getElementById("update").innerHTML = "Edits saved!";
}