美文网首页
36_axios请求

36_axios请求

作者: CHENPEIHUANG | 来源:发表于2018-02-21 19:58 被阅读0次
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
        </head>
        <body>
            <script src="axios.min.js"></script>
            <script>
                //第一种
    //          axios({
    //              url:"01-http.php?username=123400&password=12aaa",
    //              method:'get'
    //          }).then(function(res){
    //              console.log(res)
    //          });
                //第二种
    //          axios.get('01-http.php?username=123aaa&password=12993').then(function(res){
    //              console.log(res)
    //          });
                //第三种
    //          axios({
    //              url:"01-http.php",
    //              data:"username=aaabbb&password=12999",
    //              method:'post',
    //              
    //          }).then(function(res){
    //              console.log(res)
    //          })
    
                //第四种
                axios.post("01-http.php","username=bbbaaa&password=2999")
                    .then(function(res){
                        console.log(res)
                    })
    
            </script>
        </body>
    </html>
    
    

    相关文章

      网友评论

          本文标题:36_axios请求

          本文链接:https://www.haomeiwen.com/subject/ruvotftx.html