3
我有以下形式:傳遞參數的onSuccess回調函數
@using (Ajax.BeginForm("DoComment", "Publication", new { id = Model.Publication.OID, parentId = Model.OID }, new AjaxOptions
{
OnSuccess = "publishCommentSuccess"
}))
{
//some code
}
如何傳遞parentId
到publishCommentSuccess
功能?
function publishCommentSuccess (json) {
if (!json.Result)
showAuthBox();
else
alert(json.Message);
};
謝謝。