Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.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
Extjs4 如何在不更改按钮形状的情况下为按钮提供链接?_Extjs4 - Fatal编程技术网

Extjs4 如何在不更改按钮形状的情况下为按钮提供链接?

Extjs4 如何在不更改按钮形状的情况下为按钮提供链接?,extjs4,Extjs4,我试图在extJs 4中创建按钮。但是由于添加了属性href和hrefTarget,它的形状发生了变化。在不将我的按钮作为锚定标记的情况下,我应该怎么做才能为我的按钮提供链接?实际上,我想在单击按钮时打开新选项卡 var startButton = Ext.create('Ext.Button', { text:'Start', id: 'startButton', href : 'h

我试图在extJs 4中创建按钮。但是由于添加了属性href和hrefTarget,它的形状发生了变化。在不将我的按钮作为锚定标记的情况下,我应该怎么做才能为我的按钮提供链接?实际上,我想在单击按钮时打开新选项卡

        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属性,因此按钮不会成为
标签