Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

vanilla js on click

var div = document.getElementById('myId');
div.addEventListener('click', function(e){
  console.log(this.getAttribute('id'))
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery is checkbox checked 
Javascript :: disable right click jquery 
Javascript :: jquery click function 
Javascript :: how to use lodash in angular 
Javascript :: document on click 
Javascript :: three js ambient light 
Javascript :: slugify text javascript 
Javascript :: thousands by comma javascript 
Javascript :: discord.js all intents 
Javascript :: create element javascript save to local storage 
Javascript :: disable right click 
Javascript :: vscode debug ignore node_modules 
Javascript :: how to know connected internet in js 
Javascript :: js fileinput get content 
Javascript :: command to create react app 
Javascript :: js is object empty 
Javascript :: javascript screen size 
Javascript :: textarea react native 
Javascript :: validate Alphabet Letter js 
Javascript :: npx for windows 
Javascript :: navigate to url jquery 
Javascript :: jquery datepicker no past dates 
Javascript :: js scrolling in div 
Javascript :: jquery open a new tab 
Javascript :: update to specific version of node brew 
Javascript :: how to set name attribute in jquery 
Javascript :: cypress set window size 
Javascript :: javascript uppercase first character of each word 
Javascript :: puppeteer get value of div 
Javascript :: how to install font-awesome 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =