<output id="bptdh"><ol id="bptdh"></ol></output>

<nobr id="bptdh"></nobr><nobr id="bptdh"><rp id="bptdh"><rp id="bptdh"></rp></rp></nobr>

    <big id="bptdh"></big>
      <noframes id="bptdh"><del id="bptdh"></del>

        <form id="bptdh"><dl id="bptdh"><rp id="bptdh"></rp></dl></form>

            <ruby id="bptdh"><del id="bptdh"></del></ruby>

            <form id="bptdh"><i id="bptdh"><ol id="bptdh"></ol></i></form>

                <nobr id="bptdh"><strike id="bptdh"></strike></nobr>

                <rp id="bptdh"><ins id="bptdh"></ins></rp>

                  新聞中心

                  互聯網+時代,說建站,談運營與網絡營銷

                  當前位置:首頁 > 新聞中心 > 前端開發 > 解決ajax的success方法無法給外部變量賦值的問題

                  解決ajax的success方法無法給外部變量賦值的問題

                  時間:2022-07-05
                  解決辦法:給ajax添加 async: false,

                  例:
                  function testAsync(){
                      var temp;
                      $.ajax({
                          async: false,
                          type : "GET",
                          url : 'tet.php',
                          complete: function(msg){
                              alert('complete');
                          },
                          success : function(data) {
                              alert('success');
                              temp=data;
                          }
                      });
                      alert(temp+'   end');

                  }
                  首頁
                  案例中心
                  關于我們
                  聯系我們
                  18禁国产精品久久久久久