- VBScript 教程
- VBScript - 主頁
- VBScript - 概述
- VBScript - 語法
- VBScript - 啟用
- VBScript - 放置
- VBScript - 變數
- VBScript - 常量
- VBScript - 運算子
- VBScript - 決策
- VBScript - 迴圈
- VBScript - 事件
- VBScript - Cookies
- VBScript - 數字
- VBScript - 字串
- VBScript - 陣列
- VBScript - 日期
- VBScript 高階版
- VBScript - 過程
- VBScript - 對話方塊
- VBScript - 面向物件
- VBScript - Reg 表示式
- VBScript - 錯誤處理
- VBScript - 其他各種語句
- VBScript 相關實用資源
- VBScript - 問答
- VBScript - 快速指南
- VBScript - 相關實用資源
- VBScript - 討論
VBScript 第二個函式
Second 函式返回一個 0 到 59 之間表示指定時間戳小時中的秒數的數字。
語法
Second(time)
示例
<!DOCTYPE html>
<html>
<body>
<script language = "vbscript" type = "text/vbscript">
document.write("Line 1: " & Second("3:13:25 PM") & "<br />")
document.write("Line 2: " & Second("23:13:45") & "<br />")
document.write("Line 3: " & Second("2:20 PM") & "<br />")
</script>
</body>
</html>
當您將其另存為 .html 檔案並在 Internet Explorer 中執行時,上述指令碼將生成以下結果 −
Line 1: 25 Line 2: 45 Line 3: 0
vbscript_date.htm
廣告