[求助]显示时钟的代码如何自动走动?
function showTime() {var myTime = new Date();
var inHours = myTime.getHours();
if (inHours < 10) {inHours = "0" + inHours}
var inMinutes = myTime.getMinutes();
if (inMinutes < 10) {inMinutes = "0" + inMinutes}
var inSeconds = myTime.getSeconds();
if (inSeconds < 10) {inSeconds ="0" + inSeconds}
document.write("现在的时间是:" + inHours + ":" + inMinutes + ":" + inSeconds)}
var inHours = myTime.getHours();
if (inHours < 10) {inHours = "0" + inHours}
var inMinutes = myTime.getMinutes();
if (inMinutes < 10) {inMinutes = "0" + inMinutes}
var inSeconds = myTime.getSeconds();
if (inSeconds < 10) {inSeconds ="0" + inSeconds}
document.write("现在的时间是:" + inHours + ":" + inMinutes + ":" + inSeconds)}
这段代码可以显示当前时间,请问如何让它自动走动?