- 1

how i can get ID when clicking video with javascript

I have downloaded many videos with PHP When I click on a video, I want to put the ID and the name of the video in a list containing the viewed videos, and when all the videos are clicked and watched, I want to create a specific event like showing a specific button.

6th Apr 2021, 1:56 PM
Motaz Alnatsha
Motaz Alnatsha - avatar
1 Odpowiedź
+ 1
Im assuming you mean the id in the HTML element if not you're gonna have to show me the location of the ID document.addEventListener('click', e => { console.log(e.target.id) })
8th Apr 2021, 9:00 PM
MyNameIsMutable
MyNameIsMutable - avatar