- Function getTime(times) '根据秒数算出天时分秒
- sec = times Mod 60 '取余数,算出剩余多少秒
- min = ( times - sec ) / 60
- If min<60 Then
- min = min
- hur = 0
- days = 0
- ElseIf min = 60 Then
- min = 0
- hur = 1
- days = 0
- Else
- min = min Mod 60 '取余数,算出是多少分
- hur = (( times - sec ) / 60 - min) / 60 '算出小时
- If hur<24 Then
- days = 0
- ElseIf hur = 24 Then
- days = 1
- Else
- hur = hur Mod 24 '取余数,算出剩余多少小时
- days = ( (( times - sec ) / 60 - min) / 60 - hur) / 24
- End If
- End If
- Response.Write days & "天" & hur & "小时" & min & "分" & sec & "秒"
- End Function
- %>
复制代码
|