- VBScript 教程
- VBScript
- VBScript - 概述
- VBScript - 語法
- VBScript - 啟用
- VBScript - 位置
- VBScript - 變數
- VBScript - 常量
- VBScript - 運算子
- VBScript - 決策
- VBScript - 迴圈
- VBScript - 事件
- VBScript - Cookie
- VBScript - 數字
- VBScript - 字串
- VBScript - 陣列
- VBScript - 日期
- 高階 VBScript
- VBScript - 過程
- VBScript - 對話方塊
- VBScript - 面向物件
- VBScript - 正則表示式
- VBScript - 錯誤處理
- VBScript - 雜項語句
- VBScript 有用資源
- VBScript - 常見問題解答
- VBScript - 快速指南
- VBScript - 有用資源
- VBScript - 討論
VBScript Month 函式
Month 函式返回一個 1 到 12 之間代表指定日期的月份的數字。
語法
Month(date)
示例
<!DOCTYPE html>
<html>
<body>
<script language = "vbscript" type = "text/vbscript">
document.write(Month("2013-06-30"))
</script>
</body>
</html>
當作為 .html 檔案儲存並在 Internet Explorer 中執行時,上述指令碼將產生以下結果 −
6
vbscript_date.htm
廣告