Can js trigger network offline mode?

problem description

is there any way for js to trigger the offline mode of the network

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Mar.23,2022

I don't know if there is any code trigger, but it can be opened manually in the network panel of the chrome developer tool.


js is generally in listening network mode. When you trigger the network mode, you feel that a simple js cannot do


window objects have onoffline events, and you can capture network outages.
window.navigator.onLine can find out whether there is a current network connection.
but it should be that should not actively cut off the network.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb2187-23b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb2187-23b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?