axios基本使用
axios 必须先导入才可以使用
使用 get 或者 post 方法即可发送对应的请求
then 方法中的回调函数会在请求成功或失败时触发
通过回调函数的形参可以获取响应内容,或错误信息
注:响应错误方法时一般为 url 出错
axios官方文档:GitHub - axios/axios:用于浏览器和节点的基于 Promise 的 HTTP 客户端.js
<body>
<input type="button" value="get请求" class="get">
<input type="button" value="post请求" class="post">
<script sr