1

我在添加 mailto: 到网格面板工具栏的链接时遇到问题。

我已经尝试修改对象的 HTML 配置以及通过处理程序,但都没有打开新的电子邮件。

{
text   : 'Support', 
html: '<a href="mailto:email@xx.com" target="_blank">Support</a>'
}


{
text   : 'Support', 
handler: function() {
   return '<a href="mailto:email@xx.com">Support</a>';
}
4

3 回答 3

2

handler:用于创建按下按钮的处理函数。要使您的 mailto 链接正常工作,您应该重定向到以下mailto:email@xx.com地址:

handler: function() {
    window.location = 'mailto:email@xx.com';
}
于 2012-05-28T16:07:22.977 回答
0

我会按照@webbandit 的建议做,除非我会使用window.open('mailto:address.com')

于 2012-05-28T20:05:55.887 回答
0

如果你使用的是 ExtJS 4.x,你可以在 href 中定义它:

{
    text : 'Support', 
    href : "mailto:email@xx.com"
 }

hrefTarget="_blank"是默认值,但最好将其设置为_self

{
    text : 'Support', 
    href : "mailto:email@xx.com",
    hrefTarget: "_self"
 }
于 2013-03-15T18:46:34.237 回答