对于ID选择器,您必须使用带有ID的“#”。
这将起作用:
$.ajax( { url: '@Url.Action("CreateProduct","ProductManagement")', dataType: 'json', contentType: 'application/json; charset=utf-8', type: 'post', data: $('this').serialize(), OR $('#frm').serialize(), <----------------- success: function () { alert('s'); }, error: function (e1, e2, e3) { alert(e2); alert(e1 + ' ' + e2 + ' ' + e3); alert('failure event'); } } );或者尝试一下:
var form = $('#frm');$.ajax({ cache: false, async: true, dataType: 'json', contentType: 'application/json; charset=utf-8', type: "POST", url: form.attr('action'), data: form.serialize(), success: function (data) { alert(data); } });


