2017-08-03 124 views
-2

我有一個超鏈接說<a id="viewemail" href="javascript:void(0)" target="_blank">View Email</a>。 我要導航到一個位置,例如:http://www.google.com 任何一個可以幫助我如何要實現這一目標在ExtJS的使用Extjs添加點擊事件超鏈接

+0

ü可以使你的問題太多具體的即在網格單元格,數據視圖或工具欄中說出來? –

+0

您想在代碼中添加onclick()運行時或其靜態代碼? – Tejas

回答

0
{ 
    text: XXX, 
    flex: 1, 
    dataIndex: 'hplink', 
    renderer: function(value, metaData, record, row, col, store, gridView){ 
    return '<a id="viewemail" href="http://www.google.com " target="_blank">View Email</a>' 
    } 
} 

{ 
    xtype: 'label', 
    displayLabel: true, 
    id: 'emailID', 
    html: '<a id="viewemail" href="javascript:void(0)" target="_blank">View Email</a>', 
    listeners: { 
     click: function (arguments) { 
      //TOdo 
     } 
    } 
}