navigator.onLine

by Gabriel

HTML

<input type="button" onclick="alert(navigator.onLine)" value="Online?" />