Ajax 请求

Ajax 请求

$.ajax({
    url: "{php echo $this->createWebUrl($filename, array('op' => 'display'))}",
    data: {id: id, sort: sort},
    dataType: "json",
    success: function (data) {
        console.log(data);
        if (data.code == 1) {
            console.log('Success');
        } else {
            console.log("Error");
        }
    }
});
 
原文地址:https://www.cnblogs.com/GetcharZp/p/11775176.html