有人给了我一个webapi接口要我写网页调用,请问一下怎么调用啊
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<button onclick="Inter()"> 点击请求</button>
<script>
function Inter() {
axios.get('xxxxxxxxxxxx')
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
</script>
</body>
</html>
axios举例,你就把地址填到我写的xxxxx哪里试一下