<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] [超哥總結](http://www.hmoore.net/chengbenchao/javascript/780049) # 一個完整的 ## 1.1 get 請求 ``` <script> /* 1.創建Ajax核心對象; 2.域服務器建立連接 3.向服務器發送請求 4.響應 */ var url = "https://www.easy-mock.com/mock/5baedb1504aec42b451a8fca/day1/test"; var xhr = new XMLHttpRequest(); xhr.open("get",url); xhr.send(); xhr.onreadystatechange = function(){ if(xhr.readyState === 4 && xhr.status ==200){ var response = xhr.responseText; console.log(response); //JSON.parse 可以將字符串轉為JSON對象 var name = JSON.parse(response).data.name; console.log(name) } } </script> ``` ## 1.2 post請求 ``` <script> var url = "https://www.easy-mock.com/mock/5bad81fca1b7f6239a61664d/dataTest/postTest"; var xhr = new XMLHttpRequest(); xhr.open("post",url); xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xhr.send(); xhr.onreadystatechange = function(){ if(xhr.readyState ==4 && xhr.status == 200){ console.log(xhr.responseText); } } </script> ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看