fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <body> <p id="demo">Click the button to see if the browser is online.</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { var x=navigator.onLine; document.getElementById("demo").innerHTML=x; } </script> </body> </html>
运行结果