Check Internet Is Connected Or Not Using JavaScript

Internet Connection Check With JavaScript

<span>Click To Check Internet is connected or Not:</span>
<input type="button" name="name" value="Click Me" onclick="CkeckInternet()" />
function CkeckInternet() {
    var NetStatus = navigator.onLine;
    if (NetStatus) {
        alert("Your Internet is Connected.");
    } else {
        alert("Your Internet is not working");
    }
}
Check Internet Is Connected Or Not Using JavaScript Check Internet Is Connected Or Not Using JavaScript Reviewed by Bhaumik Patel on 7:40 AM Rating: 5