how i can get ID when clicking video with javascript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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 Answer
+ 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