easyui datagrid添加行时设置焦点

onBeginEdit:function(index ,data){  
                var ed = $(this).datagrid('getEditor', { index: index, field: 'Number' });  
                $(ed.target).next().children().focus();         //api上是直接ed.target,发现没反映,需要把ed.target下一个元素的第一个子元素设置成focus才行  
                //$($(ed.target).next().children()[0]).focus(); //如果上面的不行用这个  
            }  

  

猜你喜欢

转载自www.cnblogs.com/shawnwxm/p/8921349.html
今日推荐