MVC MVC
-------Controllers 中
public ActionResult GetA()
{
return null;
}
-------页面里
$(document).ready(function () {
alert("b");
$.ajax({
url: "GetA",
type: "POST",
dataType: 'json',
contentType: "application/json; charset=utf-8",
//beforeSend: function() { },
success: function (result) {
alert("a");
}
});
});
-================
调不到 GetA 方法 是url 写错了吗?