


Example of a simple JS method to view document creation date, modification date and document size
This article mainly introduces the simple method of JS to view the document creation date, modification date and document size. It analyzes the related operation skills of JavaScript using fileCreatedDate attribute, fileModifiedDate attribute, lastModified attribute and fileSize attribute in the form of examples. Friends who need it You can refer to the following
The example of this article describes the simple method of viewing the document creation date, modification date and document size using JS. Share it with everyone for your reference, the details are as follows:
1 Introduction
To view the document creation date, modification date and document size, you can use fileCreatedDate property, fileModifiedDate property, lastModified property and fileSize property.
fileCreatedDateAttribute
This attribute is used to obtain the creation date of the document.
Syntax:
[date=]fileCreatedDate
date: String variable used to store the creation date of the document . date is optional.
fileModifiedDateAttribute
This attribute is used to obtain the last modified date of the document.
Syntax:
[date=]fileModifiedDate
date: String variable used to store the last modification of the document date. date is optional.
lastModifiedAttribute
This attribute is used to obtain the last modification time of the document.
Syntax:
[date=]lastModified
##date: String variable used to store the last modification of the document time. date is optional.
fileSizeAttribute
This attribute is used to obtain the size of the document. Syntax:[size=]fileSize
size: String variable used to store the document size. size is optional.
Second Application
View the document creation date, modification date and document sizeThis example displays the The document's creation date, modification date, and document size.Three codes
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>www.jb51.net 查看文件创建时间、修改时间和文档大小</title> </head> <body> 查看文件创建时间、修改时间和文档大小<br> <script lanage="javaScript"> <!-- document.write("<b>该文档创建日期: </b>"+document.fileCreatedDate+"<br>"); document.write("<b>该文档修改日期: </b>"+document.fileModifiedDate+"<br>"); document.write("<b>该文档修改时间: </b>"+document.lastModified+"<br>"); document.write("<b>该文档大小: </b>"+document.fileSize+"<br>"); --> </script> </body> </html>
Four running results
Use ajax to preview the link and you can see the content of the link
In (ASP/PHP/ A collection of methods to disable ajax caching in JSP/html/js)
Use Ajax technology to complete the home page login function through the XMLHttpRequest object
The above is the detailed content of Example of a simple JS method to view document creation date, modification date and document size. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article will introduce how to solve the problem of insufficient memory or disk space to repage or print the document in Microsoft Word. This error usually occurs when users try to print a Word document. If you encounter a similar error, please refer to the suggestions provided in this article to resolve it. Insufficient memory or disk space to repage or print this document Word error How to resolve the Microsoft Word printing error "There is not enough memory or disk space to repage or print the document." Update Microsoft Office Close memory-hogging applications Change your default printer Start Word in safe mode Rename the NorMal.dotm file Save the Word file as another

It is 395 words, which is 495. This article will show you how to add red lines in Word documents. Redlining a document refers to making modifications to the document so that users can clearly see the changes. This feature is very important when multiple people are editing a document together. What redline means Marking a document Redlining means using red lines or callouts to indicate changes, edits, or revisions to a document. The term was inspired by the practice of using a red pen to mark printed documents. Redline comments are widely used in different scenarios, such as clearly showing recommended changes to authors, editors, and reviewers when editing a document. Propose changes and modifications in legal agreements or contracts Provide constructive criticism and suggestions on papers, presentations, etc. How to give W

In recent years, with the continuous development of network technology, our lives are inseparable from various digital tools and the Internet. When processing documents, especially in writing, we often use word documents. However, sometimes we may encounter a difficult problem, that is, the hyperlink in the word document cannot be opened. This issue will be discussed below. First of all, we need to make it clear that hyperlinks refer to links added in word documents to other documents, web pages, directories, bookmarks, etc. When we click on these links, I

Title: Realme Phone Beginner’s Guide: How to Create Folders on Realme Phone? In today's society, mobile phones have become an indispensable tool in people's lives. As a popular smartphone brand, Realme Phone is loved by users for its simple and practical operating system. In the process of using Realme phones, many people may encounter situations where they need to organize files and applications on their phones, and creating folders is an effective way. This article will introduce how to create folders on Realme phones to help users better manage their phone content. No.

This article will interest you if you are interested in using GIMP for pixel art creation on Windows. GIMP is a well-known graphics editing software that is not only free and open source, but also helps users create beautiful images and designs easily. In addition to being suitable for beginners and professional designers alike, GIMP can also be used to create pixel art, a form of digital art that utilizes pixels as the only building blocks for drawing and creating. How to Create Pixel Art in GIMP Here are the main steps to create pixel pictures using GIMP on a Windows PC: Download and install GIMP, then launch the application. Create a new image. Resize width and height. Select the pencil tool. Set the brush type to pixels. set up

Many friends expressed that they want to know how to create a family in Gree+ software. Here is the operation method for you. Friends who want to know more, come and take a look with me. First, open the Gree+ software on your mobile phone and log in. Then, in the options bar at the bottom of the page, click the "My" option on the far right to enter the personal account page. 2. After coming to my page, there is a "Create Family" option under "Family". After finding it, click on it to enter. 3. Next jump to the page to create a family, enter the family name to be set in the input box according to the prompts, and click the "Save" button in the upper right corner after entering it. 4. Finally, a "save successfully" prompt will pop up at the bottom of the page, indicating that the family has been successfully created.

When you encounter a blank page issue when opening a Word document on a Windows 11/10 computer, you may need to perform repairs to resolve the situation. There are various sources of this problem, one of the most common being a corrupted document itself. Furthermore, corruption of Office files may also lead to similar situations. Therefore, the fixes provided in this article may be helpful to you. You can try to use some tools to repair the damaged Word document, or try to convert the document to another format and reopen it. In addition, checking whether the Office software in the system needs to be updated is also a way to solve this problem. By following these simple steps, you may be able to fix Word document blank when opening Word document on Win

In iOS17, Apple has added a contact poster feature to its commonly used Phone and Contacts apps. This feature allows users to set personalized posters for each contact, making the address book more visual and personal. Contact posters can help users identify and locate specific contacts more quickly, improving user experience. Through this feature, users can add specific pictures or logos to each contact according to their preferences and needs, making the address book interface more vivid. Apple in iOS17 provides iPhone users with a novel way to express themselves, and added a personalizable contact poster. The Contact Poster feature allows you to display unique, personalized content when calling other iPhone users. you
