Manipulating style with getElementsByClassName

后端 未结 5 1104
名媛妹妹
名媛妹妹 2021-01-27 10:25

I don\'t understand why I cannot manipulate the style of .special in my code. I\'m sure it\'s something simple, but it\'s not working.

I am an h1!<

5条回答
  •  无人共我
    2021-01-27 10:59

    Because x is returning as an array of objects. You could use jQuery to return a list of more manipulable objects, or do a count on the return, and iterate through the array, setting properties on each item as you go.

提交回复
热议问题