实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <title>axios get 请求 - runoops.com</title> </head> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> <body> <script type="text/javascript"> //请求方式2 axios.get('//demo.runoops.com/php/axios-request.php', { params: { param1: "value1", param2: "value2" } }).then(function (response) { let data = response.data; console.log(data); document.write(data); }).catch(function (error) { console.log(error); }); </script> </body> </html>
运行结果: