与服务端的交互请求比较个性化,需要自行封装组件,在组件中可以用 fetch 自行实现。
示例:fetch(location.href).then(function (res) { return res.text();}).then(function (text) { fetchElement.innerHTML = 'fetch: ' (text.search('mip-test') !== -1);});
此教程来源于《搜外网-夫唯SEO培训》,网址:https://www.seowhy.com/
本教程连接:https://www.seowhy.com/a/1281.html 为原创表示感谢!