关于Ext.XTemplate

var tpl = new Ext.XTemplate(
'

',
'',
'Commission Information:',
'',
'',
'',
' ',
' ',
' ',
' ',
' ',
' ',
'',
'',
'
Commission Unit {CommissionUnit}Course Level {CourseLevel} UnusualInvoice:{UnusualInvoice} 
'
);
Ext.Ajax.request({
url: '/Url/Institution/InstitutionExtendList.aspx',
method: "POST",
params: {
institutionid: document.getElementById("ID").value
},
success: function(response, options) {
var responseArray = Ext.util.JSON.decode(response.responseText);
tpl.overwrite('attlist', responseArray);
},
failure: function() {
Ext.Msg.alert("Alarm", "Commission Information读取失败。");
}
});

主要是;我想写个能删除的方法.但不成功.应该怎么改呢.

2个回答

[code="java"]
var tpl = new Ext.XTemplate(
'

',
'',
'Commission Information:',
'',
'',
'',
' ',
' ',
' ',
' ',
' ',
' ',
'',
'',
'
Commission Unit {CommissionUnit}Course Level {CourseLevel} UnusualInvoice:{UnusualInvoice} 
'
,{
delatt : function(){
//your code
},
otherFunc : function(){
//your code
}
}
);

.....

[/code]

你要传参数的话
[code="java"]

...

delatt : function(id){

alert(id);
//your code

},

[/code]

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问