Javascript Essentials Part 1
Nov 1, 2008 Essentials, Javascript
Website Launched Since – Javascript Code
<script language="javascript"> montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") function countup(yr,m,d){ today=new Date() todayy=today.getYear() if (todayy < 1000) todayy+=1900 todaym=today.getMonth() todayd=today.getDate() todaystring=montharray[todaym]+" "+todayd+", "+todayy paststring=montharray[m-1]+" "+d+", "+yr difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1) difference+=" days" document.write("It has been "+difference+" since the launch of website name") } //enter the count up date using the format year/month/day countup(2005,09,07) </script>
Related Posts
Tags: code, essential, Javascript, most wanted, scripts
Try Random Style!
Leave a Reply