首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

怎么实现隔30秒执行一次自定义方法 web

2012-01-23 
如何实现隔30秒执行一次自定义方法web我自己定义了一个方法showcat(i,temp)intitemp为字符串数组.如何实

如何实现隔30秒执行一次自定义方法 web
我自己定义了一个方法   showcat(i,temp);
  int   i       temp为字符串数组.

如何实现隔段时间就执行一次这个方法???




[解决办法]
1.
setintenal()
2.
function funname()
{
settimeout(...);
funname();
}
[解决办法]
thread.sleep(3000)
[解决办法]
在你的页面中 放一个 <iframe frameborder= "0 " height= "0 " width= "0 " marginheight= "0 " marginwidth= "0 " scrolling= "no "
src= "upaction.aspx "> </iframe>
然后在upaction.aspx中 定时30秒刷新
<html>
<head>
<meta http-equiv= "refresh " content= "30;URL=upaction.aspx " />
</head>
</html>
每刷新一次 在upation.aspx的PageLoad中 执行你的方法showcat(i,temp);
[解决办法]
2楼 4楼方法君可
[解决办法]
如果是WEB的话就 <meta http-equiv= "refresh " content= "30;URL=upaction.aspx " /> ,WINFORM就TIMER
[解决办法]
以上方法自己选吧
[解决办法]
还是用线程吧

热点排行