jsp定时方法 jsp定时方法 $(function(){ totaladd(); //定时时触发的函数 setInterval(totaladd,3000);//设置定时1000=1秒 }); function totaladd(){ alert(12); }