近期服务器不想在维护了,接口已经陆续开放
服务器也经常奔溃,一分价钱一分货
忠告:出了事情要学会使用法律武器保护自己
主要推荐初步入门学习的伙伴,可以借助这些接口丰富自己的站点
API接口包括:
var xhr = new XMLHttpRequest()
xhr.open('get', 'http://wx0725.top/project/api/xiaohua.php')
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
var result = JSON.parse(xhr.responseText);
console.log(result[0].content);// 打印第一条笑话的内容
}
}
xhr.send();
fetch('http://wx0725.top/project/api/xiaohua.php', {
method: 'GET',
}).then(res => {
res.json().then(json => {
console.log(json[0].content);
})
})
$.ajax({
url: 'http://wx0725.top/project/api/xiaohua.php',
type: 'get',
dataType: 'json',
success: function(res) {
console.log(res[0].content)
},
error: function(e) {
console.log(e);
}
})
JavaScript - Vue/node
教程 :http://www.axios-js.com/zh-cn/docs/
PHP
教程 :https://blog.csdn.net/qq_44009311/article/details/108329349
Python
教程 :http://wx0725.top/index.php/archives/802/
Java
教程 :https://blog.csdn.net/qq_44009311/article/details/107226065
必备的浏览器插件:API 接口 爬虫必备 谷歌插件 JSON 数据 可视化