Monday, October 12, 2009

What's Today's Date? -How to put today's date in a blog

I knew was going to be a great day, because you visited my blog.

This next piece of javascript is common to a lot of ads. It's  used to create a sense of urgency,and  immediacy, so you think the ad was updated just that day.

<p>Update: The free trial is still available as of <SCRIPT>var mydate=new Date(); mydate.setDate(mydate.getDate()-0);var theYear=mydate.getFullYear(); var day=mydate.getDay(); var month=mydate.getMonth(); var daym=mydate.getDate(); if (daym<10)daym="0"+daym;var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); var montharray=new Array("January","February","March","April","May"," June","July","August","September","October","November","December"); document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+theYear);</SCRIPT>!</b>

The free trial will always still be available as of the date you open it, as long as the ad runs. Play around with the text in red to create your own unique message incorporating the date!

How about changing the red text to:

I knew ... was going to be a great day, because  visited  my blog!

No comments: