Extjs4 如何在不更改按钮形状的情况下为按钮提供链接?
我试图在extJs 4中创建按钮。但是由于添加了属性href和hrefTarget,它的形状发生了变化。在不将我的按钮作为锚定标记的情况下,我应该怎么做才能为我的按钮提供链接?实际上,我想在单击按钮时打开新选项卡Extjs4 如何在不更改按钮形状的情况下为按钮提供链接?,extjs4,Extjs4,我试图在extJs 4中创建按钮。但是由于添加了属性href和hrefTarget,它的形状发生了变化。在不将我的按钮作为锚定标记的情况下,我应该怎么做才能为我的按钮提供链接?实际上,我想在单击按钮时打开新选项卡 var startButton = Ext.create('Ext.Button', { text:'Start', id: 'startButton', href : 'h
var startButton = Ext.create('Ext.Button', {
text:'Start',
id: 'startButton',
href : 'http://www.google.com',
hrefTarget: '_blank',
baseCls:'deviceAuthenticationButtonCls button-link',
handler : function() {
console.log(Ext.getCmp('startButton'));
console.log("Form ",form.getForm().getValues());
form.getForm().setValues([
{id:'First', value: "0006660767C7"},
{id:'Second', value: "00066607644D"}
]);
var data = form.getForm().getValues();
console.log("Data To Send :- ",data);
form.getForm().submit({
url: './mmaGlove/',
method:'POST',
params : {
deviceAuthenticationData: JSON.stringify(data)
},
success: function(){
window.location = "http://www.google.com";
},
failure : function(){
alert('Got Error..');
}
});
}
});
也许您可以在函数处理程序中重定向:
function() { window.location = "http://www.sencha.com" }
。。。例如。在这种情况下,您不设置href属性,因此按钮不会成为
标签