討論 » 開發
I get undefined class valueHiI'm trying to get class value but i get undefinedI'm trying to get class qZpD9d Text ContentWho contains Total Videos Uploaded Number for this channel = 6357 videos so far
qZpD9d
6357 videos
Go to any youtube Video and mouse hover on channel name it will popup small window contain Total Videos Uploaded Number for this channel
https://www.youtube.com/watch?v=jNw4G4sBgYI
class name it's the same for me for every Video i open Maybe the class name changed for every region See this image for more info
https://i.imgsafe.org/c55f39c938.jpg
My script is
var Total = document.querySelector('.qZpD9d').textContent; alert(Total);
maybe it is because the dialog you want to access is loaded dynamically and does not exist when you run your script.
登入以回復
I get undefined class value
Hi
I'm trying to get class value but i get undefined
I'm trying to get class
qZpD9d
Text ContentWho contains Total Videos Uploaded Number for this channel =
6357 videos
so farGo to any youtube Video and mouse hover on channel name it will popup small window contain Total Videos Uploaded Number for this channel
class name it's the same for me for every Video i open Maybe the class name changed for every region
See this image for more info
My script is