How to get all child inputs of a div element (jQuery)

前端 未结 6 1751
一生所求
一生所求 2020-12-12 11:52

HTML:

6条回答
  •  粉色の甜心
    2020-12-12 12:52

    The 'find' method can be used to get all child inputs of a container that has already been cached to save looking it up again (whereas the 'children' method will only get the immediate children). e.g.

    var panel= $("#panel");
    var inputs = panel.find("input");
    

提交回复
热议问题