<html> <head> <title>在指定的时间反复调用函数</title> </head> <body onLoad="showtxt()"> <script language="javascript"> <!-- function showtxt(){ a = txt.value; txt.value = a + "*"; } setInterval("showtxt()",1000); //--> </script> <input type="text" id="txt"> </body> </html>