el codigo es el siguiente
Código Javascript:
Ver original
function horaServidor() { var myurl = 'dimehoraXML.php'; myRand = parseInt(Math.random()*999999999999999); var modurl = myurl+"?rand="+myRand; http.open("GET", modurl, true); http.onreadystatechange = useHttpResponse; http.send(null); } function useHttpResponse() { if (http.readyState == 4) { if(http.status == 200) { var timeValue = http.responseXML.getElementsByTagName("timenow")[0]; document.getElementById('showtime').innerHTML = timeValue.childNodes[0].nodeValue; } } else { document.getElementById('showtime').innerHTML = '<img src="anim.gif">'; } }
En esta linea :
http.onreadystatechange = useHttpResponse;
se llama a la funcion useHttpResponse, pero mi duda es : POR QUE NO LLEVA los parentesis ??? osea asi useHttpResponse()
Gracias a todos Saludos