Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 聚焦或滚动面板_Javascript_Extjs - Fatal编程技术网

Javascript 聚焦或滚动面板

Javascript 聚焦或滚动面板,javascript,extjs,Javascript,Extjs,我有一个搜索框,它给了我超过20个结果。。使用上一个和下一个按钮,我可以转到下一个或上一个字符串。。但是我的页面不会移动 launch: function () { Ext.define('MyViewController', { extend: 'Ext.app.ViewController', alias: 'controller.myview', // This method is called as a "handler" for

我有一个搜索框,它给了我超过20个结果。。使用上一个和下一个按钮,我可以转到下一个或上一个字符串。。但是我的页面不会移动

launch: function () {
    Ext.define('MyViewController', {
        extend: 'Ext.app.ViewController',
        alias: 'controller.myview',

        // This method is called as a "handler" for the change color button in our view
        onnextClick: function () {
            var mypanel = this.lookupReference('mypanel'),
                header = mypanel.getHeader();

            header.setStyle('background-color', '#FFEFBB');
            header.el.down('div.demo-title').setStyle('background-color', '#ccc');
 header.el.down('div.demo-title').focus(); // I want to do like this 

        }
    });

你能告诉我如何设置滚动或窗口焦点吗

您应该如何聚焦
div
?好的。但如何做到这一点呢