setTimeout是一次性的
setInterval是连续的
function DisplayTrace{ setTimeout(DisplayTrace,"2000")}
function DisplayTrace{}
ID = setInterval(DisplayTrace, 2000, "Interval called");
setInterval是连续的
function DisplayTrace{ setTimeout(DisplayTrace,"2000")}
function DisplayTrace{}
ID = setInterval(DisplayTrace, 2000, "Interval called");