getElementById() wildcard

后端 未结 6 2227
北荒
北荒 2020-11-28 11:37

I got a div, and there i got some childnodes in undefined levels.

Now I have to change the ID of every element into one div. How to realize?

I thought, becau

6条回答
  •  清歌不尽
    2020-11-28 12:34

    jQuery allows you to find elements where a particular attribute starts with a specific value

    In jQuery you would use

    $('[id^="path_test_"]')
    

提交回复
热议问题