简体   繁体   中英

on(“input”) not working in IE9

Below code is not working in IE 9 or older versions. But it is working perfectly on Chrome. What could be wrong with this?

I am using Jquery 1.10.2.min.js

 $("[id$='txtNewPass2']").on("input", function () {
    if (myPlugin.metReq() == true && $("[id$='txtNewPass2']").val().length > 0) //return true or false
       $("#imgSubmit").removeAttr("disabled").css('opacity', 1);
    else
       $("#imgSubmit").attr("disabled", "disabled").css('opacity', 0.5);
 });

update:

I just saw .. My browser in Quirks mode. Does it effect anything?

在此处输入图片说明

This answer suggests to use .on('input propertychange') to support older browsers. Does that work for you? If you wanted to use a jquery event you could use .on('keyup')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM