使用eruda.js调试移动端页面

在index.html中加入以下代码 链接后面带上forDevelopment就可以开启调试
<script>
(function (window) {
if (window.location.href.indexOf('forDevelopment') > 0) {
var erudaEl = document.createElement('script');
erudaEl.setAttribute('type', 'text/javascript');
erudaEl.setAttribute('src', "https://cdn.bootcss.com/eruda/1.4.1/eruda.min.js");
document.head.append(erudaEl);
erudaEl.onload = function () {
eruda.init();
}
}
})(window);
</script>

猜你喜欢

转载自www.cnblogs.com/aisiqi-love/p/11764627.html