jqgrid动态添加rowlist

function changePager(){
     var pagerCenter =$('#grid-pager_center');//获取td
     pagerCenter.find('select').each(function(){//在td里面再查找select元素
         if($(this).hasClass('ui-pg-selbox ui-widget-content ui-corner-all')){//目前select的class值为ui-pg-selbox
             $(this).append('<option id="a'+1+'" value="'+1+'">全部</option>');//往select添加option
             $(this).val(1);//给select赋值
             $(this).trigger('change');//触发select的change事件
         }
     });
}

原文地址:https://www.cnblogs.com/shizhijie/p/8385871.html