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标签。

解决方案 »

  1.   

    如果着急赶工,可以考虑将double强转成int
      

  2.   

    上一贴发错了,看到runat="server",asp 不懂...
    从页面考虑来说,给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";    
    }
    大概思路就是这样。