voici ma fonction
Code : Tout sélectionner
<script type="text/javascript">
alert(navigator.onLine ? "Vous êtes en ligne" : "Vous êtes hors ligne");
</script>merci de votre aide
Code : Tout sélectionner
<script type="text/javascript">
alert(navigator.onLine ? "Vous êtes en ligne" : "Vous êtes hors ligne");
</script>
Code : Tout sélectionner
document.location.href = "url";
<html><head>
<script type="text/javascript">
function isThere(url) {
o = new ActiveXObject("Microsoft.XMLHTTP");
try {
o.open("HEAD", url, false);
o.send(null);
return o.status == 200 ? true : false;
}
catch(er){
return false;
}
}
if (isThere("http://192.168.70.6/intranet/index.php")) {
alert("ok");
}
else {
alert("pas ok");
}
</script>
</head>
<body>
</body>
</html>