function getConfigRentrun(reson) { var aa=JSON.parse(reson); for (var obj in aa) { var temmp=document.getElementById(obj); temmp.value=aa[obj]; if (obj=="GPS_North") { if (aa[obj]=="on") { temmp.checked=true; }else { temmp.checked=false; } } } } function getDevinfoRetrun(retrun) { var div=document.getElementById('devinfo'); div.innerHTML=retrun; init() } function getstataRetrun(retrun){ var div=document.getElementById('statid'); div.innerHTML=retrun; } var datad; function init() { httpget("/php/GetConfig.php",datad,getConfigRentrun) } function getinit() { httpget("/php/GetIniFile.php",datad,getDevinfoRetrun) httpget("/php/GetSata.php",datad,getstataRetrun) } function rebootclicked() { httpget("/php/reboot.php",datad,getrebootRentrun) var div=document.getElementById('statid'); div.innerHTML=""; } function getrebootRentrun(ret) { alert(ret) setTimeout(() => { location.reload() }, 100); } window.onload=getinit;