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

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

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

相关推荐

发表回复

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