大家麻烦打开这个网站 http://www.dionly.com/diamond.asp 里面有个钻石搜索功能,鼠标移上去的时候,可以显示行的信息,点击下一页或者其他按钮,里面的数据动态加载,鼠标在移上去都可以显示信息,不知道她们是怎么做的。哪位大哥大姐知道啊,帮帮忙啊

解决方案 »

  1.   

    ajax咯。移动上去,传送该行数据的ID,然后页面处理后。返回。这边获取。并在已经设置好定位的DIV中添加信息!
      

  2.   

    onmousemove等显示信息
    看看页面源码,AJAX获取相关数据
    加载时动画显示
      

  3.   

    ajax 请求数据 。
    解析 。
      

  4.   

    楼上的说的很赞同:onmouseover自动激发事件,传递给后台程序Id号,ajax实现根据该Id号将信息反馈给页面,这样就实现了。
      

  5.   

    帮楼主顶一下!也期待这个程序源码!!如果哪位大哥有类似源码发给小弟一份吧。全做学习交流!!
    email:[email protected]
      

  6.   

    好了,大家,我做出来了  js   <script type="text/javascript">
       
      
            function getAbsolutePosition(o){//获取对象的绝对位置
              var p={x:o.offsetRight,y:o.offsetTop};
              while(o=o.offsetParent){
              p.x+=o.offsetRight;p.y+=o.offsetTop;
              }
              return p;
            }        function showPopUp(){//
              var p=getAbsolutePosition(this),popDV=document.getElementById('popDV');
             
              popDV.style.top=p.y+'px';
              popDV.style.display='block';
            }
            var mouseOutTimer=false;
            
            //window.onload=function(){//加载完毕后给a标签添加事件
            function shou(){
            var as=document.getElementById('dvCT').getElementsByTagName('span');
              for(var i=0;i<as.length;i++){
              as[i].onmouseover=showPopUp;
              }
            }
            function hide(e){
              var dv=document.getElementById('popDV');
              if(e===true)dv.style.display='none';//计时器直接隐藏
              else{//如果鼠标从弹出层移出时,
              var refObj=e.toElement||e.relatedTarget;
              if(!dv.contains(refObj))dv.style.display='none';//不是div的子控件则隐藏
              }
               
            }
            if(typeof HTMLElement!='undefined')HTMLElement.prototype.contains=function(o){//扩展非IE浏览器下的contains方法
              if(this==o)return true;
              while(o=o.parentNode)if(o==this)return true;
              return false;
            }
        </script>GridView 里面    <asp:TemplateField HeaderText="编号">
                                                        <ItemTemplate>
                                                            <span onmousemove="shou()">
                                                                <%# Eval("Id")%></span>
                                                        </ItemTemplate>
                                                        <ItemStyle CssClass="" Width="7%" />
                                                    </asp:TemplateField>
    后台    protected void getAllDate_RowDataBound(object sender, GridViewRowEventArgs e)
        {        if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#ededed';show('" + DataBinder.Eval(e.Row.DataItem, "CertificateID").ToString() + "');p1('" + DataBinder.Eval(e.Row.DataItem, "PrimaryAppearance").ToString() + "');p2(" + DataBinder.Eval(e.Row.DataItem, "PrimaryWeight").ToString() + ");p3('" + DataBinder.Eval(e.Row.DataItem, "PrimaryNeatness").ToString() + "');p4('" + DataBinder.Eval(e.Row.DataItem, "PrimaryColor").ToString() + "');p5('" + DataBinder.Eval(e.Row.DataItem, "PrimaryTurner").ToString().Substring(1, 2) + "');p6('" + DataBinder.Eval(e.Row.DataItem, "PrimaryTurner").ToString().Substring(3, 2) + "');p7('" + DataBinder.Eval(e.Row.DataItem, "PrimaryTurner").ToString().Substring(4, 2) + "');p8('" + DataBinder.Eval(e.Row.DataItem, "PrimaryTurner").ToString() + "');p9('" + DataBinder.Eval(e.Row.DataItem, "SalePrice").ToString() + "')");
             
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");        }    }