PDA

View Full Version : Date Stamp Coding and Custom Text



Speedy4946
25 Oct 2009, 09:25 AM
Hi -

I am new to this site and I am having two issues that I can not solve.

The first is that I need to have a date on my website update automatically everyday. If today is October 25, 2009, then I want that date on my website to say that as well.

Also, is there a way to add a custom font to my website easily? I would love to have the date in a handwriting font. I have that font and can load it to the server but didn't know if I could link it.

I am using Dreamweaver for this website.

Please help!

is_numeric
25 Oct 2009, 12:23 PM
<script type="text/javascript">
<!--
var obj= new Date();
var month = obj.getMonth() + 1;
var day = obj.getDate();
var year = obj.getFullYear();

document.write(month + "/" + day + "/" + year);
//-->
</script>


here is a list of date methods for displaying other formats

http://www.w3schools.com/jsref/jsref_obj_date.asp

/////////////////////

Regarding fonts

You cant use any font as a website doesn't work like that

You make reference to a common font everyone uses and the browser uses that. IE can embed fonts but this is a gimmick really