var xhr = new XMLHttpRequest(); xhr.open("POST", "http://www.baidu.com", true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)) { console.log(xhr.responseText); } }; xhr.send("id=1&name=xmsb");
原创文章,作者:,如若转载,请注明出处:https://blog.ytso.com/272467.html