点击运行
Navigator 对象
如果浏览器在线,则 onLine 属性返回 true:
运行结果