function checccker try myImg new Image myImg src http ya ru logo png M

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
function checccker() {
try {
myImg = new Image();
myImg.src = 'http://ya.ru/logo.png?'+ Math.random();
setTimeout('checkccker()', 2000);
}catch(e) {}
}
function checkccker() {
var status = 'No connection!';
if (myImg.complete) {
status = "Connected";
}
alert(status);
}