How to insert date into your webpage

Some newbie are still wondering how to insert the date into their webpage that updated everyday. Below are the code and the date will be like ” 12 May 2007 ” Date Code: ————————————————– <script language=”JavaScript”> <!– function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this[i + 1] = makeArray.arguments[i]; } var months = new makeArray(‘January’,’February’,’March’,’April’,’May’,’June’, ‘July’,’August’,’September’,’October’,’November’,’December’); var date = new Date(); var day = date.getDate(); var month = date.getMonth() + 1; var yy = date.getYear(); var year = (yy < 1000) ? yy + 1900 : yy; document.write(day + ” ” + months[month] + ” ” + year); //–>             </script> ——————————————– Simply copy and paste the code into the Text file first, then copy again the date code from the text file and paste it to your webpage html mode. Please do not paste it to your webpage. You must paste it into HTML mode. If you’re using Microsoft Frontpage, then you will see there are 3 mode at the bottom of the webpage, which are Normal, HTML and Preview. You must paste the code in the HTML mode. I hope this help.

Facebook comments:

Leave a Reply

Your email address will not be published. Required fields are marked *