<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>
var cache = {}; var data; $("#seachers").autocomplete( { source: function (request,response) { var term = request.term; if (term in cache) { data = cache[term]; response($.map(data.NameList,function (item) { return { label: item.ProjectName }; })); } else { $.ajax({ url: "@this.Url.Action("AutoGet","Project")",dateType: "jsonp",data: { top: 10,key: request.term },success: function (data) { if (data.NameList.length) { cache[term] = data; response($.map(data.NameList,function (item) { return { label: item.ProjectName }; })); } } }); } },minLength: 1,autoFocus: false,delay: 500 });
原文地址:https://www.jb51.cc/ajax/166704.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。