37
rated 0 times
[
39]
[
2]
/ answers: 1 / hits: 20219
/ 5 Years ago, tue, january 7, 2020, 12:00:00
I have a list with two items. The second item's ID is generated by getTime()
and concatenated with new$
, forming a random ID as shown in the image below.
I need to target that element to perform some functions, but when I try to do that using querySelector
, it produces an error saying that it is not a valid selector, even when I use String()
to covert the generated random number to a string.
What am I missing here?
More From » reactjs