showing results for - "if button is pressed js"
Jana
02 Oct 2020
1<button>A</button>
2<button>B</button>
3<button>C</button>
4<script>
5  document.body.addEventListener("click", event => {
6    if (event.target.nodeName == "BUTTON") {
7      console.log("Clicked", event.target.textContent);
8    }
9  });
10</script>
queries leading to this page
how to check when a button is pressed jsjavascript know when button pressedhow to do a javascript function when button is pressedcheck if 40 is pressed using javascriptbutton pressed javasciptif button is pressed jshot oto check if button is pressed in jsjs check if keyboard button is pressedhow to check which button is pressed in javascriptget whatt button is pressed javascriptjavascript if element pressedcheck if button is pressed jsjs if w is pressedjavascript how to check if a button is pressedjs if pressedjavascript check if button is pressedhow to check if any button is pressed javascriptcheck what button is being pressed javascriptjavascript button pressedhow to know when a html is pressed in jshow to check if button has been pressed jsjs check if button is pressedcheck what button is being pressed html javascriptif button is pressed javascripthow to detect in javascript whether a buttpn is pressedjavascript button stay pressedhow to add javascript if a button is pressedjavascript if element a is pressedhtml how to tell if a button is pressed in javascriptcheck if control is pressed javascriptcheck what button was pressed javascripthow to check if a button is pressed in javascriptif button pressed jsjavascript if key pressedif button press javascriptif is pressed jsbutton pressed jsjavascript how to check if a button is pressed in htmldetect which button was pressed javascriptjavascript if 40 is pressedjavascript if button pressedjs check if button was pressed in htmljavascript how to detect button pressedbutton is pressed javascriptcheck which button is pressed javascriptjavascript check if button is being pressedif a button is pressed in javascrit 27if button is pressed js