標籤:io ar art cti amp new sp on c
一、字串
data: "begin=" + $("#dateStart").val() + "&end=" + $("#dateEnd").val() + "&rank=" + $("#selectTime").val() + "&PsNet=" + $("#selectPsNet").val() + ‘&pageIndex=‘ + pageIndex + ‘&items_per_page=‘ + items_per_page,
二、JSON對象
data: filter,
var filter =
{
"begin": $("#dateStart").val(),
"end": $("#dateEnd").val(),
"rank":$("#selectTime").val() ,
"PsNet" : $("#selectPsNet").val(),
‘pageIndex‘: pageIndex ,
‘items_per_page‘: items_per_page
}
var filter =
{
begin: $("#dateStart").val(),
end: $("#dateEnd").val(),
rank: $("#selectTime").val(),
PsNet: $("#selectPsNet").val(),
pageIndex: pageIndex,
items_per_page: items_per_page
}
三、自訂對象
data: filter,
var filter = new QueryFilter(pageIndex, items_per_page);
filter.begin = $("#dateStart").val();
filter.end = $("#dateEnd").val();
filter.rank = $("#selectTime").val();
filter.PsNet = $("#selectPsNet").val();
function QueryFilter(pageIndex, items_per_page) {
var filter = new Object;
filter.begin = "";
filter.end = "";
filter.rank = "";
filter.PsNet = "";
filter.pageIndex = pageIndex;
filter.items_per_page = items_per_page;
return filter;
}
ajax方法data參數