Click event on select option element in chrome

前端 未结 13 1125
闹比i
闹比i 2020-11-22 11:38

I\'m having a problem in Chrome with the following:

var items = $(\"option\", obj);  

items.each(function(){

    $(this).click(function(){

           


        
13条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 12:16

    
    
    $('#myselect').change(function() {
        if($('#myselect option:selected').val() == 0) {
        ...
        }
        else {
        ...
        }
    });
    

提交回复
热议问题