Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if you click something in javascript

// get the element
const element = document.getElementById('profile_title')

// always checking if the element is clicked, if so, do alert('hello')
element.addEventListener("click", () => {
	alert('hello');
});
 
PREVIOUS NEXT
Tagged: #check #click #javascript
ADD COMMENT
Topic
Name
4+2 =