GM_xmlhttpRequest 无法获取查询数据
https://elearn.cuc.edu.cn/edu3/data/zke.aspxGM_xmlhttpRequest这个页面,获取不到查询数据
//============代码如下===
var params = {
'__EVENTTARGET': 'btConfirm',
'__EVENTARGUMENT': '',
'__VIEWSTATE': '/wEPDwUKMTg4MzkxNTM4OA9kFgICAw9kFgICAQ9kFgICBQ8QDxYCHgtfIURhdGFCb3VuZGdkEBUEDDIwMjLlubQxMuaciAwyMDIz5bm0MTLmnIgLMjAyNOW5tDbmnIgLMjAyM+W5tDbmnIgVBAwyMDIy5bm0MTLmnIgMMjAyM+W5tDEy5pyICzIwMjTlubQ25pyICzIwMjPlubQ25pyIFCsDBGdnZ2dkZGQXwq21YIF0O0Iw8vqjOoqzjXLzlA==',
'__EVENTVALIDATION': '/wEWCALogq+NAQLEhISFCwKvhL6CCwLkgaTgBQLkgZCgBQL214PJDwL215eJDgKt58etAZPh3kZ12vGTTAJIYatE99T35W8Z',
'__VIEWSTATEGENERATOR': '60ACC285',
'txtName': '',
'txtNumber': '',
'listTime': '2024年6月'
};
GM_xmlhttpRequest({
method: "POST",
url: "https://elearn.cuc.edu.cn/edu3/data/zke.aspx",
data: params,
headers: {
"content-type": "application/x-www-form-urlencoded"
},
onreadystatechange: function (response) {
//if (response.readyState == 4 && response.status == 200) {
// 处理返回值
var data = response;
console.log(data);
//}
}
}); 我猜一手:`data: params,` 的问题,data只能接受字符串,然而这里的params是一个object
页:
[1]