大神帮忙看下谢谢
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>对象</title>
<script type="text/javascript">
function changebg(){
var a=document.getElementById("bgimg").selectIndex;
var srcimg=document.getElementById("myimg").src;
switch(a){
case 0:
srcing="img/1.jpg";
break;
case 1:
srcing="img/2.jpg";
break;
case 2:
srcing="img/3.jpg";
break;
case 3:
srcing="img/4.jpg";
break;
case 4:
srcing="img/5.jpg";
break;
}
}
</script>
</head>
<body>
<img src="img/1.jpg" id="myimg" onclick="alert('载入画面')" />
选择背景图片:
<select id="bgimg">
<option value="naga">1</option>
<option value="lycan">2</option>
<option value="blood">3</option>
<option value="chaos">4</option>
<option value="razor">5</option>
</select>
<input type="button" value="确定" onclick="changebg()" />
</body>
</html>
想写一个通过下拉框改变的图片的程序但是运行没有效果我在同一目录里面的img里面放了五张图片1-5.jpg。大神帮忙看下问题出在哪里?谢谢