我创建了一个ajax“ get”请求并获得成功,但是数据返回空。 因此,我正在另一个域上执行此请求-“ crossDomain:true”。
另一个问题,如果我想使用cookie或其他选项来登录aliExpress网站,我该怎么做?
$.ajax({
url: "https://www.aliexpress.com/item/32536233599.html",
method: "GET",
dataType: "html",
async: false,
cache: false,
crossDomain: true,
xhrFields: {
withCredentials: true
},
success: function (data) {
console.log(data)
}
});
我希望获取html数据。