0
我使用離線js來檢測互聯網上下。 我的代碼如下離線js不能檢測到互聯網
$(document).ready(function() {
Offline.options = {
reconnect: {
initialDelay: 10,
delay: (5)
}
}
Offline.on('up', internetUp);
Offline.on('down', internetDown);
function internetUp(event, data) {
console.log("Internet is up.");
}
function internetDown(event, data) {
console.log("Internet is down.");
}
});
我面臨的問題。當互聯網下跌沒有事件火災和互聯網時達兩個事件被觸發需要幫助,我使用離線JS 0.7.13版本。