---
在ASP MVC中使用 Ajax:
@Ajax.ActionLink("刪除", "Delete", new { id = item.Id },
new AjaxOptions()
{
HttpMethod= "Delete",
Confirm="你確定要刪除嗎?",
OnSuccess = "function() { alert('hello'); }"
})
改為下面這樣就好了:
OnSuccess = "(function() { alert('hello'); })()"
Reference :
沒有留言:
張貼留言