Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.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
如何创建链接到textfile/excelsheet/url(EXTJS)的按钮?_Extjs - Fatal编程技术网

如何创建链接到textfile/excelsheet/url(EXTJS)的按钮?

如何创建链接到textfile/excelsheet/url(EXTJS)的按钮?,extjs,Extjs,我需要创建一个链接到textfile/excel sheet/url的按钮。如何在EXTJS中执行同样的操作?有人能帮我写代码吗 new Ext.Button({ text: 'PRESS ME', handler: function() { window.open('http://textfiles.com/or/spreadsheet.xls', '_blank'); } }); 如果您不想打开新窗口,也可以在处理程序中使用window.location='。我使用由创

我需要创建一个链接到textfile/excel sheet/url的按钮。如何在EXTJS中执行同样的操作?有人能帮我写代码吗

new Ext.Button({
  text: 'PRESS ME',
  handler: function() {
    window.open('http://textfiles.com/or/spreadsheet.xls', '_blank');
  }
});

如果您不想打开新窗口,也可以在处理程序中使用
window.location='

我使用由创建的
Ext.LinkButton
(您必须添加自己的扩展名),它工作得非常好

它在这里使用HTML