Ajax $.getJSON案例詳解
更新時間:2013年03月05日 14:54:30 作者:
ajax中的$.getJSON方法想必大家非常熟悉吧,本文接下來將在為你鞏固一下,感興趣的你可以參考下,希望對你有所幫助
復(fù)制代碼 代碼如下:
<script type="text/javascript">
function pageIndexChanged() {
var url = "/OrderList/Lists";
var where = "";
@*location.href = "@this.Url.Action("List")?pageindex=" + $("#pager").pager("pageindex") + "&pagesize=" + $("#pager").pager("pagesize") + "&where=" + escape(where);*@
var pageindex = $("#pager").pager("pageindex");
var pagesize = $("#pager").pager("pagesize");
where = escape(where);
$.getJSON(url, { where: where, pageindex: pageindex, pagesize: pagesize }, function (data) {
alert(data.total);
alert(data.rows[0].Order.OrderID);
alert(data.PageIndex);
alert(data.PageSize);
});
}
$(function () {
$("#order-details-search").click(function () {
$(".detail-search").show(100);
});
$("#detail_search_cancle").click(function () {
$(".detail-search").hide(100);
})
});
</script>
相關(guān)文章
你的jquery ajax無效和你的jquery引入路徑有關(guān)
當(dāng)你發(fā)現(xiàn)你的jquery ajax無效的時候,不妨使用 fire bug調(diào)試一下,這時你會發(fā)現(xiàn),提示"$"無效,為什么會有這種提示呢?可能是你引入jquery.js的路徑有問題2013-06-06
甩掉ashx和asmx使用jQuery.ajaxWebService請求WebMethod簡練處理Ajax
這篇文章主要介紹了甩掉ashx和asmx使用jQuery.ajaxWebService請求WebMethod簡練處理Ajax的相關(guān)資料,需要的朋友可以參考下2016-08-08
配合AJAX天氣預(yù)報的webService 之a(chǎn)sp
配合AJAX天氣預(yù)報的webService 之a(chǎn)sp...2007-01-01

