代码之家  ›  专栏  ›  技术社区  ›  George Johnston

获取第一个隐藏字段

  •  1
  • George Johnston  · 技术社区  · 14 年前

        $(document.body).click(function() {
           $(".content").each(function(i) {
               $(this).
           });
        });
    

    如何检索$(this)中第一个隐藏字段的值?

    1 回复  |  直到 14 年前
        1
  •  4
  •   Sarfraz    14 年前

    你可以用 :hidden :first

    $(document.body).click(function() {
       $(".content").each(function(i) {
           $(':hidden:first', $(this)).val();
       });
    });