2014-02-18 237 views
1

這裏jQuery函數是我的代碼:執行從服務器端

string script = "GoNext()"; 
ScriptManager.RegisterClientScriptBlock(this, GetType(), "next", script, true); 

客戶端:

$(document).ready(function() { 
    function GoNext() { 
      $("#wizard").scrollable().next(); 
    } 
}); 

我得到一個控制檯錯誤說GoNext是不確定的

回答

3

不要把功能在$(document).ready(function() {塊中,因爲其範圍在ready塊內,並且它在全局範圍內不可用。

function GoNext() { 
    $("#wizard").scrollable().next(); 
}