OnChange not firing in IE

后端 未结 7 1250
我在风中等你
我在风中等你 2020-12-04 01:40

I wish to fire a Onchange event for all the changes of Form elements within a DIV

Here\'s the snippet




7条回答
  •  眼角桃花
    2020-12-04 02:22

    I had the same problem in Edge and fixed it using an EventListener.

    My code looked like this:

    HTML:

    
    

    Then I changed it to:

    HTML:

    
    

    JS:

    document.getElementById("my_id").addEventListener("change", function() {
        my_function(this.value.trim())
    });
    

提交回复
热议问题