have made this for check the time:
function orologio(){
var ora=new Date()
var or=ora.getHours()
var mi=ora.getMinutes()
var se=ora.getSeconds()
//------Correzione sintassi orario------//
if(or>12){
or = or-12;
} if (or==0){
or = 12;
}
//------Stampa per controllo orario-------//
document.all["abc"].value=or+":"+mi+":"+se
}
and it work but when i recall some value in other function like this
$(function(){
for(var i=1; i<=12; i++){
var r = binario(i);
if((r%2)==0){
r = r.split("").reverse().join("");
}
if(r == orologio(or)){
var e = orologio(mi);
e = (Math.floor(e/10))+1;
$('#prova2').append(e.substr(e));
}
$('#prova2').append(r + "<br/>");
}
});
the program stop work when have to make control if value r = orologio(or).
How can i do this if that work?
Thanks Claudio

New Topic/Question
Reply


MultiQuote





|