1个回答
展开全部
document.write('<img src="');
var day=(new Date()).getDay();
switch(day){
case 0:
document.write('sunday.jpg');
break;
case 1:
document.write('monday.jpg');
break;
case 2:
document.write('tuesday.jpg');
break;
case 3:
document.write('wednesday.jpg');
break;
case 4:
document.write('thursday.jpg');
break;
case 5:
document.write('friday.jpg');
break;
case 6:
document.write('saturday.jpg');
break;
}
document.write('" alt="" />');
var day=(new Date()).getDay();
switch(day){
case 0:
document.write('sunday.jpg');
break;
case 1:
document.write('monday.jpg');
break;
case 2:
document.write('tuesday.jpg');
break;
case 3:
document.write('wednesday.jpg');
break;
case 4:
document.write('thursday.jpg');
break;
case 5:
document.write('friday.jpg');
break;
case 6:
document.write('saturday.jpg');
break;
}
document.write('" alt="" />');
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询