Description: Adds date to Browser title bar
Author(s)/or Link: cisco007
Code taken from here: http://www.dynamicdrive.com/dynamicindex6/titledate.htm
bbcode usage:
Code: Select all
[titledate][/titledate]
Code: Select all
<script type="text/javascript">
/*<![CDATA[*/
//date in title by Randall Smith copyright 1999
//Permission given to Dynamicdrive.com to feature it in it's DHTML archive
//Script modified by Dynamicdrive.com to make it cross browser friendly. Visit Dynamicdrive.com for more DHTML scripts
//please visit me on the web at http://members.xoom.com/u4rstunzd/
//and to change the title:where it says Welcome todays date is: just put you own text in if you would like to--
var isnMonth = new
Array("January","February","March","April","May","June","July","August","Septerber","October","November","December");
var isnDay = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today = new Date () ;
Year=today.getYear();
if (Year < 1000)
Year+=1900
Date=today.getDate();
function setdate(){
document.title="Today\'s date is: "+isnDay[today.getDay()]+", "+isnMonth[today.getMonth()]+" "+Date+", "+Year+""
}
if (document.all)
setdate()
else if (document.getElementById)
window.onload=setdate
/*]]>*/
</script>
Code: Select all
[titledate][/titledate]
Code: Select all
[titledate][/titledate]
which means you leave empty!
tested on Firefox 16.0.1, IE 8, and Opera 12.02
DEMO:
this topic
[titledate][/titledate]