jQuery select where attribute = value

后端 未结 2 1227
挽巷
挽巷 2021-01-13 08:23

I am trying to select an input where the value equals a dynamic value

trimmed = jQuery.trim(a);
preSelectedCheckBox = $(this).find(\"input[value=\" + trimmed         


        
2条回答
  •  春和景丽
    2021-01-13 08:46

    preSelectedCheckBox = $(this).find("input[value=" + trimmed + "]");
    

    forget the '' around the value

提交回复
热议问题