How to insert the option Last Modified to your webpage

Last update on September 17, 2009 10:53 AM by jak58
Published by jak58

How to insert the option “Last Modified” to your webpage











If you are new to the web programming sphere and want to know when you have last updated your pages’ content, there is a very simple code, in JavaScript, that allows you to activate this feature.

Hence, all you have to do is to copy the codes displayed below in the body of your webpage and save it:


<BODY>
<CENTER>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000) 
fyear = fyear + 1900
document.write(wday + ", " + lmonth + " " + date + ", " + fyear)
// End -->
</SCRIPT>
</CENTER>
</BODY>
Best answers for « How to insert the option Last Modified to your webpage » in :
Disabling right click on your webpage Show Disabling right click on your webpage More than often, while trying so save some text or pictures from a website, you might wonder why your right click is not allowed. This is a simple JavaScript code that has been inserted in the website...
How to easily display PHP/HTML codes in your webpages Show How to easily display PHP/HTML codes in your webpages What code to use? If you want your visitors to be able to see the source codes of your webpage, there is a very easy way to do so. Normally, all you have to do in a HTML file using...
Date of last modification made on a webpage Show Date of last modification made on a webpage With PHP it is possible to automatically display the last modification of the current page:
How to insert picture background on Microsoft! ShowHow to insert picture background on Microsoft! To make a work sheet more appealing, you can add picture to your background. Below is a tip for doing so. Open your Microsoft and select Format> Backgrounds > Printed Watermarks in the menu...
Excel tips : How to insert date in a cell ShowExcel tips : How to insert date in a cell Below are some tips on how to insert date and time in an excel cell for a specific purpose:- To insert current date, press CTRL ť+ ;ť in the chosen cell. To insert current time, press CTRLť+...
Inserting text in a file ShowInserting text in a file Introduction Syntax Introduction It is sometimes useful to insert text in the header of one or more document (s) or in a specific part of the document (before or after a specific line). The publisher of...
Download HTML Calendar Maker Pro ShowHTML Calendar Maker Pro is a software to create monthly calendar on a web page. Easy to use, it does not require any knowledge in programming. The calendar is customizable: - modification of colors and fonts, - insertion of image and code...
Download Form Auto Fills ShowDescription: Form Auto Fills is a software to fill in forms in Internet Explorer, MSN Explorer and Maxthon. It offers two options for filling your forms: one by filling from a by specific default model and the other by inserting your information in...
PC assembly - Inserting memory modules ShowInserting RAM modules There are various types of random access memory. The latest motherboards are equipped with DDR2 or DDR memory. Some are even equipped with RAMBus memory. The oldest ones actually have SDRAM connectors, or even EDO RAM...
HTML forms ShowForms Interactive forms let web page authors give their pages interactive elements, such as for receiving messages from their readers, much like the reply cards found in some magazines. The reader enters information by filling in fields or clicking...
Managing images in HTML ShowHow do you display images on a web page? Having a few images on a website can make it more attractive and user-friendly. However, it is important not to go overboard, since images can take a long time to load, and in some cases can make a document...