我想在 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 中正常工作而不会出现错误..
最佳答案
您可以将点击事件分配给组件并在那里编写代码
{
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/