1

我需要使用 URL 中的 2 个参数并在 OnSuccess 回调函数中使用它们。

这是从服务器发送的 URL:

http://localhost:35325/?Message=ChangePasswordSuccess&param1=%23UserSettings

我需要这样发送 param1:

@using (Ajax.BeginForm("Manage", "Account", new AjaxOptions { HttpMethod = "POST", Confirm = "Você tem certeza que deseja salvar a alteração?", OnSuccess = "close(Message, param1);" }))

在这里,我收到一个参考错误:ReferenceError: param1 is not defined。

我该如何解决?

4

1 回答 1

0

我发现这是正确的方法:

@using (Ajax.BeginForm("Manage", "Account", new AjaxOptions { HttpMethod = "POST", Confirm = "Você tem certeza que deseja salvar a alteração?", OnSuccess = "close(Message, param1);" }))

谢谢

于 2012-11-20T02:01:34.053 回答