- 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
广告