Files
TowerOptoSifAndSpectral/html/javascript/config.js
2021-12-23 14:43:26 +08:00

46 lines
755 B
JavaScript

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)
}
function rebootclicked()
{
alert("reboot")
}
window.onload=getinit;