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