这是我的代码
<html>
<head>
<script language="javascript" src="JS/jQuery.js"></script>
<script>
function page_refresh(){
document.getElementById('form2').action="project_file_dir.cfm"
document.getElementById('form2').submit();
}
</script>
</head>
<body >
<cfoutput>
<cfset fileLocation ="\\squeaker\SiSystemsFile\WebServices\WebSites\Perforce\Bhargavi"> <!--- On mac set to /tmp --->
<cfdirectory
action = "list"
directory = "#fileLocation#"
name = "files"
filter="*.*">
<form method="post" id="form2">
<cfset f="#files.recordcount#">
<cfset mydatetime=now()>
<cfset a=TimeFormat(MyDateTime,'hh:mm:ss tt')>
Total File in <b> #fileLocation# </b> Count is <b> #f# </b> #TimeFormat(MyDateTime,'hh:mm tt')#
<input type="button" name="Refresh" value="refresh" onclick="page_refresh()"><br>
<b>Next Run</b>
<cfset b=TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm:ss tt')>
#TimeFormat(DateAdd('n', +5, MyDateTime),'hh:mm tt')#
</cfoutput>
<cfset a= Minute(Now())>
<cfset b=a%5 >
<cfoutput>#b#</cfoutput>
<!--- <cfinclude template="page_move_2.cfm"> --->
<cfloop condition="b gt 0">
<cfoutput>inside loop</cfoutput>
<cfset Sleep(6000)>
<cfset b = b - 1 >
</cfloop>
<cfoutput>hi</cfoutput>
</form>
</body>
</html>
我需要每 5 分钟刷新一次页面。这个怎么做 。我使用了 sleep() 函数,但在执行 sleep() 之后加载了 ui 本身。这是我如何每 5 分钟重新加载一次页面