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

后端 未结 4 1969
忘掉有多难
忘掉有多难 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:23

    Are you sure onclick does not work? Did you check for javascript errors?

    The following works in IE7 (don't have IE6 to test)

    
        
           
        
        
            
            
        
    
    

    Note: This is only for onclick. OnChange works differently in IE, see GOsha's answer.

提交回复
热议问题