javascript setTimeOut
var oldVariable_code="";
function clock()
{
// javascript time clock date
now = new Date();hours = now.getHours();minutes = now.getMinutes();seconds = now.getSeconds();
$.ajax({url: "heartbeat"})
timeValue = hours+':'+((minutes < 10) ? "0":"") + minutes + ":"+((seconds < 10) ? "0":"") + seconds ;
//_refreshv("clock",timeValue);
newVariable_code=_lookup("Variable_code");
if (oldVariable_code!=newVariable_code){
setCookie("VariableCODE",newVariable_code,1);
company(newVariable_code,"NAME","company");
setCookie("VariableCOMPANY",_lookup('company'),1);
History()
oldVariable_code=newVariable_code;
}
setTimeout("clock()",1000);
}
clock();
沒有留言:
張貼留言