0
有兩件事情我沒有在這個場景理解太清楚如何調用一個函數在Page.ClientScript正確
首先,有一個javascript是這種格式
function Allocate()
{
this.Name = $("allocateName");
this.AddAllocation = $("addAllocation");
this.setCustom= $("setCustom");
}
... some other initializations here
Allocate.prototype.EnableAllocations = function() {
this.enableAllAlloactions();
this.setCustomAllocations();
}
這是隻是一個例子,這是什麼類的Javascript類?這是在一個名爲Allocate.js的文件中。
我的問題有以下幾點:
如果我打電話給在Page.ClientScript.RegisterClientScriptBlock(...);
我會怎麼做,該EnableAllocations?