Automatically upload an html file to another (index.html) in an index div

0

I need to load a page on a main page. I did it with .load ("file.html") but it only opens it in firefox and if it inspects it brings an unbalanced tree error of elements, and chrome and explorer do not even open it, it appears access denied in the call of the load ()

You can tell me how to replace the load ().

<!DOCTYPE HTML> 
<html>
  <head>
  <meta http-equiv="Content-Language" content="es"/ >
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" type="text/css" href="scripts/estilos.css"/>
  <title>Estación 2</title>
  <script type="text/javascript" src="scripts/jquery.min.js"></script>
  <script type="text/javascript" >
     var meses = new Array ("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
     var diasSemana = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
     var f=new Date();
     document.write(diasSemana[f.getDay()] + ", " + f.getDate() + " de " + meses[f.getMonth()] + " de " + f.getFullYear());
   $(document).ready(function() {
        setInterval(actualizar,500);
   }) 
   function actualizar(){
      $("#contenedor").load("write.html");
   }
  function actualizaReloj() {
    marcacion = new Date()
    Hora = marcacion.getHours()
    Minutos = marcacion.getMinutes()
    Segundos = marcacion.getSeconds()
    dn = "a.m"
    if (Hora > 12) {
    dn = "p.m"
    Hora = Hora - 12
  }
  if (Hora == 0)
  Hora = 12
  if (Hora <= 9) Hora = "0" + Hora
  if (Minutos <= 9) Minutos = "0" + Minutos
  if (Segundos <= 9) Segundos = "0" + Segundos 
  //Termina el Script del Reloj 
  var Script, Total
  Script =  Hora + ":" + Minutos + ":" + Segundos + " " + dn
  Total = Script
  document.getElementById('Reloj').innerHTML = Total
  setTimeout("actualizaReloj()", 1000)
  }
</script> 

</head>
<body onload="actualizaReloj()">
  <div>
    <p id="fecha"></p>
    <p id="Reloj"></p>
  </div>
    <div id="contenedor" ></div> 
</body>
</html>
    
asked by Daniela 07.10.2017 в 21:14
source

0 answers