77家的会客2010

ColdFusion中定时跳页的三种方法
Weather:晴 ,东北风 4-5级 ,最高气温28 ℃

刚才去台湾 MMUG看到的,其中前两种方法是我们所熟知的html标签跳转法以及js超时跳转法,第三种者是真正的CF自己的跳转方法。

第一种:使用meta
<meta http-equiv="refresh" content="3; url=happy.htm">

第二种:使用JS的setTimeout
setTimeout("window.location='url'",1000)

第三种:使用CF服务器端主动跳转
<cfset thread = CreateObject("java", "java.lang.Thread")>
<cfset thread.sleep(3000)>
<cflocation url="xxxxxx">
使用的是CF Administrator API的睡眠功能,使程序中止3秒中再输出。

历史上的今天: [2012/07/26]Lotus Notes中C/S模式下进度条的使用

[ColdFusion中定时跳页的三种方法]的回复

Post a Comment~