typeof 运算符
返回一个用来表示表达式的数据类型的字符串。typeof[()expression[]] ;expression 参数是需要查找类型信息的任意表达式。 说明
typeof 运算符把类型信息当作字符串返回。typeof 返回值有六种可能: "number," "string," "boolean," "object," "function," 和 "undefined."
返回一个用来表示表达式的数据类型的字符串。typeof[()expression[]] ;expression 参数是需要查找类型信息的任意表达式。 说明
typeof 运算符把类型信息当作字符串返回。typeof 返回值有六种可能: "number," "string," "boolean," "object," "function," 和 "undefined."
Dim MyDate, YourDate, NoDate, MyCheck
MyDate = "October 19, 1962": YourDate = #10/19/62#: NoDate = "Hello"
MyCheck = IsDate(MyDate) ' 返回 True。
MyCheck = IsDate(YourDate) ' 返回 True。
MyCheck = IsDate(NoDate) ' 返回 False。
</script>呵呵,用了VBSCRIPT简单点。
isValidDate(value)
检测的日期格式为:yyyy-mm-dd