JQuery selector logical “and”

后端 未结 3 2176
感动是毒
感动是毒 2021-02-14 00:47

How can I access elements that have name X and type hidden?

3条回答
  •  遥遥无期
    2021-02-14 01:28

    You should try this if you want type=hidden

    $('input[name="X"][type="hidden"]')
    

    If you want an element that is hidden via css then you should try

    $('[name="X"]:hidden')
    

提交回复
热议问题