Skip to content
Discussion options

You must be logged in to vote

querySelectorAll 回傳的是一個很像陣列的東西,不是單一元素,所以 .style 會是 undefined
要自己用 forEach 去對每一個元素修改

https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll#accessing_the_matches

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PT-HUANG
Comment options

Answer selected by PT-HUANG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants