1
jquery.unobtrusive-ajax.js如下所示:如何在不更改jquery.unobtrusive-ajax.js文件的情況下擴展Microsoft jQuery Unobtrusive Ajax?
我想下面的事件添加到庫中,這樣我可以使用asyncRequest()函數,但在不同的文件中。
$(document).on("change", "select[data-ajax=true]", function (evt) {
evt.preventDefault();
asyncRequest(this, {
url: this.href,
type: "GET",
data: []
});
});