jQuery selector for a checkbox that contains certain text in its name attribute

前端 未结 3 1789
庸人自扰
庸人自扰 2021-01-06 08:44

I\'m trying to find a selector in jQuery that select all inputs that are checkboxes and their name contains a specific word like \"top\" or \"Top\". Having trouble b/c its

3条回答
  •  無奈伤痛
    2021-01-06 09:01

    You were close...

    $("input[type='checkbox'][name^='Top']").each()
    

    jsFiddle Demo

提交回复
热议问题