Answers for "how to click html button javascript"

3

click button javascript

// Create variable for what you are trying to click
let button = document.querySelector("#IDofItem");

// Click the button

if (button) {
  button.click();
}
else {
  console.log("Error");
}
Posted by: Guest on March-03-2021
1

html javascript button click

<button onClick="alert('some thing to say');">click</button>
Posted by: Guest on August-24-2021

Code answers related to "how to click html button javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language