<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
#contenter{width:903px; margin:0 auto;padding:20px;background-color:#fff;color:#D96D00;font-family:"Kozuka Mincho Pro R" ,arial; line-height:1.5em;font-size:16px;}
#contenter p{text-indent: 2em;word-spacing: 2px;}
#contenter p a{text-decoration: none;color:#663300;}
#contenter p a:hover{text-decoration: underline;color:#FFCC99;}
#hearder{width:902px;hed}
#contenter img{float:left;padding-right:10px;padding-bottom:5px;}
</style>
<script type="text/javascript">
var myImages=new Array("abc.jpg","def.jpg","opq.jpg","hij.jpg");
function change(number)
{
var imged=document.images[number];
var newnumber=Math.round(Math.random()*3);
while(imged.src.indexOf(myImages[newnumber]) !=-1)
{
newnumber=Math.round(Math.random()*3);
}
imged.src=images[newnumber];
return false;
}
</script>
<title>one note(遇见那个你自己喜欢的自己)</title>
</head>
<body>
<img src="abc.jpg" onclik="return change(0)"/>
</body>
</html>为什么点击的时候没有切换图片
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
#contenter{width:903px; margin:0 auto;padding:20px;background-color:#fff;color:#D96D00;font-family:"Kozuka Mincho Pro R" ,arial; line-height:1.5em;font-size:16px;}
#contenter p{text-indent: 2em;word-spacing: 2px;}
#contenter p a{text-decoration: none;color:#663300;}
#contenter p a:hover{text-decoration: underline;color:#FFCC99;}
#hearder{width:902px;hed}
#contenter img{float:left;padding-right:10px;padding-bottom:5px;}
</style>
<script type="text/javascript">
var myImages=new Array("abc.jpg","def.jpg","opq.jpg","hij.jpg");
function change(number)
{
var imged=document.images[number];
var newnumber=Math.round(Math.random()*3);
while(imged.src.indexOf(myImages[newnumber]) !=-1)
{
newnumber=Math.round(Math.random()*3);
}
imged.src=images[newnumber];
return false;
}
</script>
<title>one note(遇见那个你自己喜欢的自己)</title>
</head>
<body>
<img src="abc.jpg" onclik="return change(0)"/>
</body>
</html>为什么点击的时候没有切换图片