作者在 2015-01-18 21:16:58 发布以下内容
一位初学者,自学很累,但不想放弃。希望在这里有人可以指点迷津一下下! 烦请前辈帮我看看这代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<script type="text/javascript">
window.onload=function(){
var Img=document.getElementsByName('img');
var i=0;
function updatetime(){
var oDate=new Date();
var arr=''+oDate.getFullYear()+(oDate.getMonth()+1)+oDate.getDate();
for(i=0;i<Img.length;i++)
{
Img[i].src='image/'+arr.charAt(i)+'.png';
}
};
};
</script>
<body>
<img src="image/0.png" />
<img src="image/0.png" />
<img src="image/0.png" />
<img src="image/0.png" />
年
<img src="image/0.png" />
<img src="image/0.png" />
月
<img src="image/0.png" />
<img src="image/0.png" />
日
</body>
</html>
我不知道为什么显示不了