判断当前的网络状态

使用

window.navigator.onLine

当返回false时说明当前无网络,返回true时说明当前网络正常

posted @ 2018-08-13 17:09  无情码字员  阅读(276)  评论(0编辑  收藏  举报