Quería saber cómo puedo llamar a un archivo php desde este archivo javascript, justo en la linea donde dice if(segs == 0){
location.reload(); (refrescar la página). ¿Alguien me ayuda?
Código:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>titulo</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript"> //<![CDATA[ // 1000 = 1 segundo var mins = 00; var segs = 10; var s; function minutos(){ document.getElementById("minutos").innerHTML=mins; if(mins == 0){ var dm = clearInterval(m); s = setInterval('segundos()', 1000); } mins--; } function segundos(){ document.getElementById("segundos").innerHTML=segs; if(segs == 0){ location.reload(); var ds = clearInterval(s); } segs--; } var m = setInterval('minutos()', 1000); //]]> </script> </head> <body> <span id="minutos"></span> : <span id="segundos"></span> </body> </html>