时默认我在我的页面中的8种图片元素 -8影像变化,并返回左
<a href = "#"><img onmouseover="mousehover(this)" onmouseout="defaultImg(this)" src = "images/1_1.jpg" height="96" width="156" style="margin-right:12px;"/></a>
<a href = "#"><img onmouseover="mousehover(this)" onmouseout="defaultImg(this)" src = "images/2_1.jpg" height="96" width="156" style="margin-right:12px;"/></a>
悬停它应该改变从1_1到1_2至1_8,然后再次1_1。在鼠标移出时,它应该显示默认图片,即1_1。像这样我有2_1,3_1到8_1。
为mousehover的JavaScript函数就是 -
function mousehover(x){
for(var i=2; i<9; i++){
x.src = x.src.replace('images/rotator/1_' + i + '.jpg');
}
}
function defaultImg(x){
x.src = x.src.replace("images/rotator/1_1.jpg");
}
不知怎的,这款鼠标悬停FUNC不起作用。而我如何获得鼠标所有图像的defaultImg。我被困在这里。有任何想法吗?
丹你应该张贴小提琴 – Zword
当前是什么行为? – ltalhouarne
犯规切换和鼠标移出显示无图 – Dan