发送一个携带参数的get请求
let xhr = new XMLHttpRequest()
xhr.open('get','http://localhost:8888/test/third?name=kelly&age=25')
xhr.send()
xhr.onload = function(){
let res = JSON.parse(xhr.responseText)
console.log(res);
}
发送一个携带参数的的post请求
<script>
window.onload = function(){
/*
发送一个携带参数的post请求
*/
let xhr = new XMLHttpRequest()
xhr