datalist里面有一列绑定的是用户的照片 当鼠标悬浮到该图片上时在图片的右边弹出一个层 层里面显示用户的详细信息  就像csdn那个 鼠标悬浮到头像上弹出详细信息  移开时隐藏层    要求用jquery ajax实现

解决方案 »

  1.   

    $("img").hover(
    function(){
    $.ajax
    (
    .........
    success:function(){
    //use a div or others html container to show the response data
    }
    );
    },
    funtion(){
    //hide
    }
    );
      

  2.   

    加个div层,在弄个鼠标事件,就可以了,    
      

  3.   


    这个我知道 我不知道怎么和后台交互   csdn 没个能搞出来的吗?
      

  4.   

    你想要与后台交互什么,用<%# Eval("")%>把datalist中的值取出来不就行了吗
      

  5.   

    $("img").hover(
    function(){
    $.ajax
    (
    .........
    success:function(){
    //use a div or others html container to show the response data
    }
    );
    },
    funtion(){
    //hide
    }
    );
    可以实现,
    用样式的相对和绝对定位也可以实现。
      

  6.   

    asp.net ajax toolkit有现成的控件。http://www.google.com.hk/search?q=asp.net+ajax+toolkit+HoverMenu&hl=zh-CN&newwindow=1&safe=strict&rls=com.microsoft:zh-cn:IE-SearchBox&source=lnt&tbs=lr:lang_1zh-CN%7Clang_1zh-TW&lr=lang_zh-CN%7Clang_zh-TW&sa=X&ei=biLhTMmLNYqcvgO85ZyvDg&ved=0CAcQpwU
      

  7.   

     $(function() {   
                $("#selPro").change(function() {    //省份下拉菜单的change事件   
                    var params = '{str:"' + $(this).val() + '"}';  //此处参数名要注意和后台方法参数名要一致                  
                    $.ajax({   
                        type: "POST",                   //提交方式   
                        url: "CasMenu.aspx/ShowCity",   //提交的页面/方法名   
                        data: params,                   //参数(如果没有参数:null)   
                        dataType: "text",               //类型   
                        contentType: "application/json; charset=utf-8",   
                        beforeSend: function(XMLHttpRequest) {   
                            $('#tipsDiv').text("正在查询...");   
                        },   
                        success: function(msg) {                           
                            $('#tipsDiv').text("查询成功!");   
                            $("#selCity option").each(function() {   
                                $(this).remove();   //移除原有项   
                            });   
                           $("<option value='0'>===请选择===</option>").appendTo("#selCity");   //添加一个默认项   
                            $(eval("(" + msg + ")").d).appendTo("#selCity");        //将返回来的项添加到下拉菜单中   
                        },   
                        error: function(xhr, msg, e) {   
                            alert("error");   
                        }   
                    });   
                });   
            });