这是我的部分观点:
<script type="text/javascript">
function onComplete() { .... }
</script>
@using (Ajax.BeginForm( new AjaxOptions { HttpMethod = "POST", OnSuccess = "onComplete" })
{
...
<input type="submit" value="Save"/>
}
当我提交表单并收到响应时,我收到 JavaScript 错误:
ReferenceError: onComplete is not defined