JS小积累-判断在线离线

作者: 狐狸家的鱼

Github: 八至

if(window.navigator.onLine==true){
    console.log('online');
    ...
 }
 else{
    console.log('offline');
    ...
}

 

相关文章:

  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-08-18
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2021-12-05
  • 2021-11-11
相关资源
相似解决方案