HTML:
<div style="width:483px; float:left; height: 340px;display:none;" id="showguidance">
<a id="showGuidanceUrl"><img width="480px" height="340px" id="showGuidanceImg"/></a>
</div>
<table id="lowerTable" style="float:right">
<tr ><td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceOne" runat="server"><img style="width:80px;height:109px;" id="lowerOne" runat="server"/></a></td></tr>
<tr ><td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceTwo" runat="server"><img style="width:80px;height:109px;" id="lowerTwo" runat="server"/></a></td></tr>
<tr><td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceThree" runat="server"><img style="width:80px;height:109px;" id="lowerThree" runat="server"/></a></td></tr>
</table>
说明:table里的 img标签的src属性和a标签的href属性 都是从数据库读出来的,求问,
如何通过jquery实现当鼠标移到table里的图片是,显示上面的div并且把鼠标多在td里的img标签src和a标签href设置给div里的img和a标签。
<div style="width:483px; float:left; height: 340px;display:none;" id="showguidance">
<a id="showGuidanceUrl"><img width="480px" height="340px" id="showGuidanceImg"/></a>
</div>
<table id="lowerTable" style="float:right">
<tr ><td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceOne" runat="server"><img style="width:80px;height:109px;" id="lowerOne" runat="server"/></a></td></tr>
<tr ><td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceTwo" runat="server"><img style="width:80px;height:109px;" id="lowerTwo" runat="server"/></a></td></tr>
<tr><td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceThree" runat="server"><img style="width:80px;height:109px;" id="lowerThree" runat="server"/></a></td></tr>
</table>
说明:table里的 img标签的src属性和a标签的href属性 都是从数据库读出来的,求问,
如何通过jquery实现当鼠标移到table里的图片是,显示上面的div并且把鼠标多在td里的img标签src和a标签href设置给div里的img和a标签。
解决方案 »
- js实现秒表后并实现每次暂停自动记录时间
- 页面中插入和删除的问题
- div 的onclick事件动态添加没效果?
- 求救:如何在applet中打开一个最大化的页面,或者让打开的页面还原按钮不可用
- 如果实现自动换行
- 关于动态判断的问题,望高手解决!
- 设置了left但是DOM中left为空
- 我想把asp的变量赋给javascript的变量,asp变量里含回车符怎么解决?
- 能不能编写一个函数来控制一段字幕的滚动??
- <input> 分为 text、radio、等。。可不可以用text[i]或者radio[i]等调用控件
- zTree安装 无数据 怎么回事,请大家指导一下
- jquery .autocomplete 的extraParams 如何传递动态变量啊!!(高分全给您)
从页面考虑来说,给table的img的onmouseover绑定处理函数。在处理函数中获取图片对象,修改对应的div样式以及图片路径。
如<td style="border-style:solid;border-color:Red;border-width:1px;" ><a id="guidanceOne" runat="server"><img style="width:80px;height:109px;" id="lowerOne" onmouseover="showPicAtDiv(this);" runat="server"/></a></td>function showPicAtDiv(e,pic)
{
var showImg = document.getElementById("showGuidanceImg");
showImg .src = pic.src;
var showDiv= document.getElementById("showguidance");
showDiv.style.display = "inline";
}
大概思路就是这样。