Ajax $.getJSON案例詳解
更新時(shí)間: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)文章
Ajax獲得站點(diǎn)文件內(nèi)容實(shí)例不涉及服務(wù)器
選擇一部著作,會通過 Ajax 實(shí)時(shí)獲得相關(guān)的名字,一個(gè)簡單的不涉及服務(wù)器的Ajax實(shí)例,需要的朋友可以參考下2014-05-05
你的jquery ajax無效和你的jquery引入路徑有關(guān)
當(dāng)你發(fā)現(xiàn)你的jquery ajax無效的時(shí)候,不妨使用 fire bug調(diào)試一下,這時(shí)你會發(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實(shí)現(xiàn)頁面自動刷新實(shí)例解析
AJAX 是一種用于創(chuàng)建快速動態(tài)網(wǎng)頁的技術(shù)。接下來通過本文給大家介紹Ajax實(shí)現(xiàn)頁面自動刷新實(shí)例解析,感興趣的朋友一起看看吧2016-04-04
js結(jié)合json實(shí)現(xiàn)ajax簡單實(shí)例
這篇文章主要為大家詳細(xì)介紹了js結(jié)合json實(shí)現(xiàn)ajax簡單實(shí)例的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-05-05
配合AJAX天氣預(yù)報(bào)的webService 之a(chǎn)sp
配合AJAX天氣預(yù)報(bào)的webService 之a(chǎn)sp...2007-01-01

