VBScript 日期函式



此函式返回當前系統日期。

語法

date()

示例

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

當你將其另存為 .html 並使用 Internet Explorer 執行時,以上指令碼將生成以下結果 −

The Value of a : 19/07/2013 
vbscript_date.htm
廣告