js效果实现问题 在mouseover 和mouseout事件中分别修改图片的 src 就可以了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 代码不全啊~~~把HTML贴出来就行了 <!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> <title> new document </title> </head><script>var ins = ["iwode/shopPic/1.jpg","iwode/shopPic/2.jpg"];var outs = ["iwode/shopPic/3.jpg","iwode/shopPic/4.jpg"];function inHandler(n,id){ if(id==2){ document.getElementById("div2").style.display = ''; } document.getElementById("img"+id).src = ins[n];}function outHandler(n,id){ if(id==2){ document.getElementById("div2").style.display = 'none'; } document.getElementById("img"+id).src = outs[n];}</script><body><img src="iwode/shopPic/3.jpg" id="img1" onmouseover="inHandler(0,1)" onmouseout="outHandler(0,1)" /><img src="iwode/shopPic/4.jpg" id="img2" onmouseover="inHandler(1,2)" onmouseout="outHandler(1,2)" /><div id="div2" style="height:200px; width:300px; border:1px solid #00C; display:none; position:absolute; left:1000px; top:500px;"></div></body></html> 好吧!我承认这个问题对你们来说很白痴,但我实在想不出要领。 jQuery中有没有清空表格的方法? 研究别人的后台发现的iframe框架问题 高手救命!InnerHTML与location.Hash的问题?遇到IE BUG了 怎么在没有安全提示的情况下得到file域中文件的大小 如何使用JS检测IE浏览器版本是不是6.0 如果不是跳到另外一个页面 请问怎么用JS在客户端对XML文件进行添加、修改 请问在text下方显示list的东东怎么做的 急:如何动态的为下拉列表添加选择项! 关于html的写法?特殊情况 关于把div层,拖现IE浏览器的想法...... function作为参数传递的问题
把HTML贴出来就行了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
</head>
<script>
var ins = ["iwode/shopPic/1.jpg","iwode/shopPic/2.jpg"];
var outs = ["iwode/shopPic/3.jpg","iwode/shopPic/4.jpg"];
function inHandler(n,id){
if(id==2){
document.getElementById("div2").style.display = '';
}
document.getElementById("img"+id).src = ins[n];
}
function outHandler(n,id){
if(id==2){
document.getElementById("div2").style.display = 'none';
}
document.getElementById("img"+id).src = outs[n];
}
</script>
<body>
<img src="iwode/shopPic/3.jpg" id="img1" onmouseover="inHandler(0,1)" onmouseout="outHandler(0,1)" />
<img src="iwode/shopPic/4.jpg" id="img2" onmouseover="inHandler(1,2)" onmouseout="outHandler(1,2)" />
<div id="div2" style="height:200px; width:300px; border:1px solid #00C; display:none; position:absolute; left:1000px; top:500px;"></div>
</body>
</html>