VBScript:TimeValue()函数

目录

TimeValue函数将给定的输入字符串转换为有效时间。

语法

TimeValue(StringTime) 

<!DOCTYPE html>
<html>
   <body>
      <script language = "vbscript" type = "text/vbscript">
         document.write(TimeValue("20:30") & "<br />")
         document.write(TimeValue("5:15") & "<br />")
         document.write(TimeValue("2:30:58") & "<br />")

      </script>
   </body>
</html>

将其另存为.html并在Internet Explorer中执行时,上述脚本将产生以下结果:

8:30:00 PM
5:15:00 AM
2:30:58 AM

作者:terry,如若转载,请注明出处:https://www.web176.com/vbscript/1180.html

(0)
打赏 支付宝 支付宝 微信 微信
terryterry
上一篇 2020年12月7日 下午5:58
下一篇 2020年12月8日 上午10:45

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注