|
| ||||||||||
| Tags: automatic, code, date, html, java, webpage |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to insert automatic date in a website
|
|
#2
| ||||
| ||||
| Re: How to insert automatic date in a website
The below is small script of java codes to add a date in the web page. You can edit it as per your need. By adding this into your website you will get an date listed in your website and it will change everyday. HTML Code: <script language="JavaScript" type="text/JavaScript"> var updMonths = ["1","2","3","4","5","6","7","8","9","10","11","12"]; var updDate = new Date(document.lastModified); var updTxt = updDate.getDate() + '/'+updMonths[updDate.getMonth()]+'/'+updDate.getFullYear(); document.write(updTxt); </script><noscript>Script for automatisk dato</noscript> |
|
#3
| |||
| |||
| Re: How to insert automatic date in a website
Below is my basic workout for your date issue. Copy the below codes and paste it in the place where you want to see the date. After that save your page and reload it. Check out weather it need some editing or not. PHP Code: |
|
#4
| ||||
| ||||
| Re: How to insert automatic date in a website
As you are just using a website for a project work here it is a simple one line code to insert a date in the web page. copy paste the code in the website html script. And just insert this and very important in your properties make sure .php is selected instead of html. PHP Code: |
|
#5
| |||
| |||
| Re: How to insert automatic date in a website
Im extremely new to all this (html, css and js) and was wondering If I wanted to put the date to be displayed somewhere on my website how can i display it in a txt box on my page, rather than only be displayed at the top of my page at current. Im trying to add this code, (well not this exact code but something very similar) to my html/css webpage. Thank you so much in advance, -Max Quote:
|
|
#6
| ||||
| ||||
| Re: How to insert automatic date in a website
You can use the JavaScript date functions and the document.lastModified properties to get the date and print it out. If you want to put in the full word for "Mon" or "Jan", you just need to change the wording in the script. |
|
#7
| |||
| |||
| Re: How to insert automatic date in a website
Hi, I used the code Katty posted (which is really useful, thx) but now I'm trying to figure out how to stylize the text (bold, underline, italics etc)... could anyone help me out? |
|
#8
| |||
| |||
Re: How to insert automatic date in a website
Yes just paste before the script example <font size="6" face="Katy Berry" color="gray"> |
|
#9
| |||
| |||
| Re: How to insert automatic date in a website Quote:
Thank you very much ![]() |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to insert automatic date in a website" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Which is the best way to insert video on my website? | Bontu | Software Development | 4 | 08-06-2011 08:14 AM |
| How to insert last date in excel 2010 | Calum | Windows Software | 5 | 17-02-2010 11:07 PM |
| Insert date format in SQL via ASP | Bansi_WADIA | Software Development | 4 | 04-12-2009 09:56 PM |
| How to Insert Google Map on Website | Gomeler | Tips & Tweaks | 3 | 21-08-2009 12:50 PM |
| Script insert date in the name of my file | Viensterrr | Software Development | 4 | 31-10-2008 07:18 PM |