VBScript Now 函式



Function Now 返回當前系統日期和時間。

語法

Now()

示例

<!DOCTYPE html>
<html>
   <body>
      <script language = "vbscript" type = "text/vbscript">
         a = Now()
         document.write("The Value of a : " & a)
       
      </script>
   </body>
</html>

當以 .html 格式儲存並使用 Internet Explorer 執行時,則上述指令碼將產生以下結果 −

The Value of a : 19/07/2013 3:04:09 PM 
vbscript_date.htm
廣告
© . All rights reserved.