XMLHttpRequest对象使用“POST”方法,需要设置“setRequestHeader” var getjson = function(){ var xhr = new XMLHttpRequest(); xhr.open("POST","ajax.php",true); //post方法需要设置header头"setRequestHea... php 2023-10-19 206 点赞 3 评论 312 浏览