“JavaScript haga clic” Código de respuesta

función jQuery onClick

$( "#other" ).click(function() {
  $( "#target" ).click();
});
Evil Elephant

JavaScript haga clic

const element = document.querySelector('element');
element.click();
HeitorAugustoLN

Haga clic en el botón 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");
}
Heathen

JS Haga clic en el botón

window.onload = function() {
    var userImage = document.getElementById('imageOtherUser');
    var hangoutButton = document.getElementById("hangoutButtonId");
    userImage.onclick = function() {
       hangoutButton.click(); // this will trigger the click event
    };
};
cadot.eu

Evento de clic del botón JavaScript

<element onclick="functionToExecute()">Click</element>
Said HR

Elemento hizo clic en JS

document.addEventListener('click', function(e) {
    e = e || window.event;
    var target = e.target || e.srcElement,
        text = target.textContent || target.innerText;   
}, false);
Jackass

Respuestas similares a “JavaScript haga clic”

Preguntas similares a “JavaScript haga clic”

Más respuestas relacionadas con “JavaScript haga clic” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código