Javascript 聚焦或滚动面板
我有一个搜索框,它给了我超过20个结果。。使用上一个和下一个按钮,我可以转到下一个或上一个字符串。。但是我的页面不会移动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
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
?好的。但如何做到这一点呢