如何在extjs中格式化标签以使其具有链接的外观?我不想有链接功能(转到特定的href)。我只想有一个经典的按钮,看起来像一个链接,并有点击听众。
我试过使用以下代码:
{
xtype: 'box',
autoEl: {tag: 'a', href: 'http://www.google.com', html: 'Google'}
}但是,这是经典的链接。
我也试过了
{
xtype: 'box',
html: '<a href="" class="link-forgot-password"> Forgot Password ?/a>'
}这看起来很好,但缺少的是listener。
发布于 2021-01-08 05:45:48
如下所示:
{
xtype: 'box',
html: '<a href="#" class="link-forgot-password"> Forgot Password ?/a>',
listeners: {
el: {
click: function () {
console.log('click');
},
scope: this
}
}
}https://stackoverflow.com/questions/65620176
复制相似问题