Get all text field value located in a specific class

后端 未结 5 1448
余生分开走
余生分开走 2020-12-24 11:51

I want to get all fields that are located in a single class name, for example my code like.

5条回答
  •  情书的邮戳
    2020-12-24 12:28

    Try this:

    $(".test .text-field")
    

    EDIT:

    To get values try this:

    $(".test .text-field").each(function() {
        alert($(this).val());
    });
    

提交回复
热议问题