jQuery change event on <select> not firing in IE

前端 未结 10 1885
甜味超标
甜味超标 2020-11-27 05:22

I\'ve got a page with a variable number of

提交评论

  • 2020-11-27 05:50

    I'm trying to understand why you need to double check the name of the select after receiving an event to it.

    Do you by any chance have multiple elements with the same id ?

    Did you actually mean to say "#container select" instead of "#container" ?

    0 讨论(0)
  • 2020-11-27 05:58

    onchange=doAction will work in IE and Firefox, but its not supported in Chrome.

    You need to use jQuery's .change event to handle this.

    0 讨论(0)
  • 2020-11-27 05:59

    IE requires change event to be placed inside document ready. This seems to bind the change event to the associated element. Hope it helps.

    0 讨论(0)
  • 提交回复
    热议问题