在线/离线事件探测

    示例:

    online-status.html

    main.js