Answers for "how to detect a click in javascript"

6

how to detect a button click in javascript

if(document.getElementById('button').clicked == true)
{
   alert("button was clicked");
}
Posted by: Guest on December-10-2019
1

how to detect clicks with javascript

element.addEventListener('click', function () {
	alert('Clicked!')
});
Posted by: Guest on September-28-2020

Code answers related to "how to detect a click in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language