这个涉及到java php asp .net

解决方案 »

  1.   

    你这样写不是很蛋疼吗?$("#GridView1 tr .bnt样式名").click(function(){
       var _v= $(this).closest("tr").find("td").eq(2).text();
       alert(_v);
    });
      

  2.   

                        function GetValue(t) {
                                $id = $(t).parent().parent().children(":eq(1)").text();
                                $obj = $(t).parent().siblings(":eq(2)").text();
                                alert($obj);
                        }
       OnClientClick="GetValue(this)"
      

  3.   

    清楚了,原来是个蛋疼问题。
    我到现在也不知道GridView是哪里的。$(function () {
        $("#GridView1 tr").each(function () {
            $bt = $(this).children().eq(8).children().attr("id")
            $("#" + $bt).click((function(){
             $ph = $(this).children().eq(2).children().text();
             return function () {
             alert($ph);
            }
                
            })() )
        })})
      

  4.   

    做闭包    $(function () {        $("#GridView1 tr").each(function () {
                $bt = $(this).children().eq(1).children().attr("id")
                $ph = $(this).children().eq(0).children().text();
                $("#" + $bt).click((function ($ph) {
                    return function () {
                        alert($ph);
                    }
                })($ph)            );
            })    })
      

  5.   

    不过最好通过DOM关系来获取好些,闭包比较容易内存泄露        $("#GridView1 tr").each(function () {
                $bt = $(this).children().eq(1).children().attr("id")
                $("#" + $bt).click(function () {
                    $ph = $(this).closest('tr').children().eq(0).children().text();
                });
            })
      

  6.   

    [email protected] , 楼主好人,发我一份