", "ajax-post.php", true); // 注意点: 以下代码必须放到open和send之间 xhr.setRequestHeader...>本文不涉及然和的介绍和其它的相关内容,只是博主简单的记录一下封装 POST 的代码:myAjax.js:const obj2str = (obj) => { // 如果没有传参, 为了添加随机因子...("POST", "ajax-post.php", { "userName": "BNTang", "userPwd": "123...({ type: "post", url: "ajax-jquery.php", data...请求到服务器 ajax({ type: "get", url: "ajax-test.php",