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() } var datad; function init() { httpget("/php/GetConfig.php",datad,getConfigRentrun) } function getinit() { httpget("/php/GetIniFile.php",datad,getDevinfoRetrun) } window.onload=getinit;