Skip to content Skip to sidebar Skip to footer

Elementbyid Finds Element But Won't Add Event Listener (chrome Extension)

I have a form in my extension's popup with the code: And then in the attached script, the fol

Solution 1:

It is working in my demos, see: JSBin

    document.addEventListener("DOMContentLoaded", function(event){
     var button = document.getElementById("update");
     button.addEventListener("click", test);
     button.style.color="red"; 
    });

Post a Comment for "Elementbyid Finds Element But Won't Add Event Listener (chrome Extension)"