Access Multiple Elements of same ID in jQuery

前端 未结 4 703
离开以前
离开以前 2020-11-29 11:15

If i have elements such as this




         


        
4条回答
  •  青春惊慌失措
    2020-11-29 12:09

    If you've inherited code so horrible that you can only work with the faulty output, use jQuery("[id=theidthatshouldbeaclassinstead]") or jQuery("[id*=theidthatshouldbeaclassinstead]") if there are multiple ids for some reason.

提交回复
热议问题