日期:2014-05-17  浏览次数:20452 次

js怎么获取repeater中行的值,达到点击每行的图像,把对应隐藏的数据显示到弹出层上
 <script type="text/javascript">
        $(function () {
            //绑定事件处理 
            $("#choice_list_district img").click(function (e) {
                if ($("#divObj").css("display") == "none") {
                    e.stopPropagation();
                    $("#divObj").text("fdafa"); //给弹出层增加内容,需要设置为hiddenfield1的值
                    //设置弹出层位置 
                    var offset = $(e.target).offset();
                    //设置弹出层位置在点击的右下面                   
                    $("#divObj").css({ top: (event.clientY + 5) + "px", left: (event.clientX + 10) + "px" });
                    $("#divObj").show();
                }
                else {
                    $("#divObj").hide();
                }
            });
            //单击空白区域隐藏弹出层 
            $(document).click(function (event) { $("#divObj").hide(); });
            //单击弹出层则自身隐藏 
            //$("#divObj").click(function (event) { $("#divObj").hide(speed) }); 
            $("#tab tr td").click(function (event) {
                $("#aaa").val($(this).html());
            });
        }); 
</script>

<asp:Repeater ID="Repeater1" runat="server" 
              onitemcommand="Repeater1_ItemCommand" onitemdatabound="Repeater1_ItemDataBound">
          <ItemTemplate>
              <div class="f8">