Logic AND for Jquery selector

后端 未结 1 1837
误落风尘
误落风尘 2021-01-17 20:27

I want to set to checked a checkbox input by value AND name..


How

相关标签:
1条回答
  • 2021-01-17 21:01

    Just use both selectors next to each other:

    $("input[name=email][value=" + i + "]").prop('checked', true);
    

    Any selectors that have no space between them are applied to the same element.

    0 讨论(0)
提交回复
热议问题