如何在extjs4中创建超链接? [英] how to create hyper link in extjs4?

查看:153
本文介绍了如何在extjs4中创建超链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在extjs4工作。我一直困在我必须在extjs4中创建一个超链接的地方。我一直在搜索很多用于在extjs4中创建超链接,但是我没有得到任何解决方案。实际上我必须包装超链接,点击该链接后,我将在extjs4中显示另一个页面。实际上我也没有得到extjs4的事件。如何在extjs4中使用超链接?
我正在使用这种方式...

  {
xtype:'panel',
html:'< a href =second.js>第二页< / a>',
}

请给我一些建议.....

解决方案

我会使用 autoEl 为此。

  {
xtype:'component'
autoEl:{
标签:'a',
href:'http://www.example.com/',
html:'Example.com'
}
}

这是一个小提琴


I am working in extjs4.I have been getting stuck at a point where I Have to create a hyperlink in extjs4.I have been searching a lot for creating hyperlink in extjs4 but I did not get any solution for it.Actually I have to crate a hyperlink and after clicking on that link I am going to display another page in extjs4. Actally also I did not get the event in extjs4. How can I use hyperlink in extjs4. I am using this way...

{
      xtype: 'panel',
      html:'<a href="second.js">Second page</a>',
}  

Please give me some suggestion.....

解决方案

I'd use an autoEl for this.

{
    xtype: 'component',
    autoEl: {
        tag: 'a',
        href: 'http://www.example.com/',
        html: 'Example.com'
    }
}

Here's a Fiddle

这篇关于如何在extjs4中创建超链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆