jQuery Attribute selector with a period

前端 未结 4 946
一向
一向 2020-12-04 02:42

I\'m trying to use a jQuery selector that finds all input fields with a specific name:

$(\'input[name=Filter\']).click(function() {
    // do something
});
<         


        
4条回答
  •  情歌与酒
    2020-12-04 03:14

    Based on my comment to the question I can confirm that this does work...

    $('input[name="Parent.Filter"]').click(function() {
    });
    

    Working example here

提交回复
热议问题