當網頁瀏覽器開始在線上工作時,ononline 屬性就會觸發。您可以嘗試執行以下程式碼來實作ononline 屬性 - #範例 function onlineFunc() { alert ("Working online!"); } function offlineFunc() { alert ("Workinf offline!"); } Got o the web browser menu bar and click the File menu. Select "Work Offline" and toggle between online and offline. 登入後複製