📜  ajax 搜索请求 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:38.204000             🧑  作者: Mango

代码示例1
function filterSearch() {
    $('.searchResult').html('
Loading .....
'); var action = 'fetch_data'; var minPrice = $('#minPrice').val(); var maxPrice = $('#maxPrice').val(); var brand = getFilterData('brand'); var ram = getFilterData('ram'); var storage = getFilterData('storage'); $.ajax({ url:"action.php", method:"POST", dataType: "json", data:{action:action, minPrice: minPrice, maxPrice:maxPrice, brand:brand, ram:ram, storage:storage}, success:function(data){ $('.searchResult').html(data.html); } }); }