Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
function loadurl(dest,formelement) {
try {
xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
}
xmlhttp.onreadystatechange = triggered;
xmlhttp.open("GET", dest);
xmlhttp.send(null);
function triggered() {
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
document.getElementById(formelement).innerHTML = xmlhttp.responseText;
}
}
}
vesku каза:Направи следното.
Сложи статистиката в отделен файл.
При показването в сайта го направи с ajax да се зарежда в някой див.
И после чрез javascript го направи да зарежда в тоя див статистиката през 1 минута.
Javascript
и със setTimeout("функция", 60*1000); за показването.Код:function loadurl(dest,formelement,onloadf) { try { xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } xmlhttp.onreadystatechange = triggered; xmlhttp.open("GET", dest); xmlhttp.send(null); function triggered() { if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { document.getElementById(formelement).innerHTML = xmlhttp.responseText; if((onloadf =="yes") && (document.getElementById(formelement).innerHTML = xmlhttp.responseText)) { window.location = window.location; } } } }