onchange / onclick in a checkbox doesn't work in IE

后端 未结 4 1974
忘掉有多难
忘掉有多难 2020-12-03 08:27

I have the following code, which works perfectly in Chrome/FF:

chkbx_send_demo.onchange = function(){
    if(sel_template.selectedIndex <= 0 && ch         


        
4条回答
  •  爱一瞬间的悲伤
    2020-12-03 09:25

    Internet Explorer only fires the onchange event when the checkbox loses the focus (onblur). also see here:
    http://krijnhoetmer.nl/stuff/javascript/checkbox-onchange/
    and here:
    http://bytes.com/topic/javascript/answers/92116-onchange-checkbox

提交回复
热议问题