你没有取到图片,要添加一个ID
应该这样写
<a onmouseover="document.myimg.scr='my_menu.files/n_bg_s.gif'" onmouseout="document.myimg.scr='my_menu.files/n_bg_s1.gif'">
<IMG id="myimg" name=myimg height=17 src="my_menu.files/n_bg_s1.gif" width=16></a>
应该这样写
<a onmouseover="document.myimg.scr='my_menu.files/n_bg_s.gif'" onmouseout="document.myimg.scr='my_menu.files/n_bg_s1.gif'">
<IMG id="myimg" name=myimg height=17 src="my_menu.files/n_bg_s1.gif" width=16></a>
是不是我的onmouse写错了,能不能给纠正一下
document.all.myimg.scr='my_menu.files/n_bg_s.gif'图片的id是myimg
var rand1 = 0;
var useRand = 0;
images = new Array;
images[1] = new Image();
images[1].src = "my_menu.files/n_bg_s.gif";
images[2] = new Image();
images[2].src = "my_menu.files/n_bg_s1.gif";
function swapPic() {
document.randimg.src = images[2].src;
}
function swapPic2() {
document.randimg.src = images[1].src;
}
</script>
<a onMouseOver="swapPic();" onMouseOut="swapPic2();"><img name="randimg"
src="my_menu.files/n_bg_s.gif"></a>
<SCRIPT LANGUAGE="JavaScript">
var arrowState=0;
function arrowIcoChange(){
var e=event.srcElement;
//alert(e.name);
if (e.name="arrow")
{
if (arrowState==0)
{
e.src="img/_arrow_m.gif";
arrowState=1;
}
else
{
e.src="img/_arrow.gif";
arrowState=0;
}
}
}
</SCRIPT>