jsp中定时触发方法是通过js的定时函数来实现的。
js中Document自带的方法:
定时执行:var tmid = window.setTimeout(“方法名或方法”, “延时”);window.clearTimeout(tmid);
<script type=”text/javascript”>
//定时执行,3秒后执行method1()
window.setTimeout(function(){
method1(“method1”);
},5000);
//定时执行,5秒后执行method2()
window.setTimeout(function(){
method2(“bbbbbb”);
},5000);
</script>