Jump to content

ianhaney

Members
  • Posts

    1
  • Joined

  • Last visited

ianhaney's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hello I need bit of help I am trying to use javascript to change the website background image on the start of each month So far I have this in between the head tags [/font][/size][/font][/color]<script>/*SM_dailyBgColor()This function automatically changes the page's background color each day of the week.Usage: SM_dailyBgColor ("januarycolor", "februarycolor", "marchcolor", "aprilcolor", "maycolor", "junecolor", "julycolor", "augustcolor", "septembercolor", "octobercolor", "novembercolor", "decembercolor");*/[/font][/size][/font][/color][color="#000000"][font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif][size=3][font=verdana]function SM_dailybg(january,february,march,april,may,june,july,august,september,october,november,december){cols=new Object();cols[0]=january;cols[1]=february;cols[2]=march;cols[3]=april;cols[4]=may;cols[5]=june;cols[6]=july;cols[7]=august;cols[8]=september;cols[9]=october;cols[10]=november;cols[11]=december;[/font][/size][/font][/color][color="#000000"][font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif][size=3][font=verdana]today=new Date();day=Math.round(today.getMonth());document.bgColor=cols[day];document.body.style.background=cols[day];}[/font][/size][/font][/color][color="#000000"][font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif][size=3][font=verdana]</script> And the below in between my body tags [/font][/size][/font][/color]<body onLoad='SM_dailybg("images/1.jpg", "images/background.png", "images/1.jpg", "images/background.png", "images/1.jpg", "images/background.png", "images/1.jpg","images/background.png","images/1.jpg","images/background.png","images/1.jpg","images/background.png");' Can some please help me and point me in the right direction to get it to work Kind regards Ian
×
×
  • Create New...