我想在EXTjs中创建链接按钮..它应该在onclick中打开新窗口
我正在使用html代码
xtype: 'component',
autoEl: {
tag: 'a',
html: 'Rearrange Column',
href: <a href="http://kanishkkunal.in" target="popup"
onclick="window.open('http://kanishkkunal.in','popup','width=600,height=600'); return false;">
Open Link in Popup
</a>,
}
我指的是这个http://www.marcusschiesser.de/2009/01/14/3-ways-to-render-html-inside-of-a-extjs-container/
https://superdevresources.com/open-links-popup/e
我想修改href代码,以便它可以在extjs中正常工作。
最佳答案
您可以将click事件分配给组件并在其中编写代码
{
xtype: 'component',
html: 'Rearrange Column',
autoEl: {
tag: 'a',
href:'#'
},
listeners: {
el: {
click: function(){
window.open('http://kanishkkunal.in','popup','width=600,height=600');
}
}
}
}
关于javascript - extjs中的链接按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50215942/