1
我想刪除行使用jQuery阿賈克斯,在我看來,我呼籲Ajax控制器js函數/動作錯誤:語法錯誤,無法識別的表達當返回HTML
<a href="javascript:void(0);" onClick="markup2('@Url.Action("ChannelDelete", "MyInfo", new {area = ""})');" class="btn btn-lg btn-danger" style="margin-bottom: 15px;">Delete</a>
function markup2(e) {
$(function() {
$("#LoadPages").empty();
$("#LoadPages").html('<div style="padding: 20px 15px"><div class="row"><div class="center-block col-md-1" style="float: none;"><img src="/Upload/pageLoader.gif" alt="loading..." /></div></div></div>');
$.ajax({
type: "POST",
url: e
}).done(function(data) {
$("#LoadPages").load(data);
});
return false;
});
}
上述功能它也沒關係,獲取網址併發送AJAX POST
並獲取數據; 當返回數據(HTML),並插入$("#LoadPages")
元素(("#LoadPages").load(data)
)
讓我一個錯誤:
Error: Syntax error, unrecognized expression:
<h2>my channels</h2> <table class="table"> <tr> <th> channel name </th> <th> name </th> <th> UserSelectedChannelJoinDate </th> <th></th> </tr> </table>
我不知道爲什麼得到錯誤
tan Q男人,3天后救我:d –
如何在on處理程序中添加參數? – Muflix