jquery Selector for input value

后端 未结 5 810
夕颜
夕颜 2020-12-15 02:54

i have here the code..

 
5条回答
  •  爱一瞬间的悲伤
    2020-12-15 03:26

    You want to select the input, then take its parent div:

    $("input[value='hello']").parent("div").css("background", "red");
    

提交回复
热议问题