Da error en Explorer
Publicado por Lady (2 intervenciones) el 28/10/2017 18:37:51
Buenas, pues tal como dice el título, funciona bajo todos los navegadores... menos en Explorer, y tengo que hacer si o si, que funcione con explorer.
Os pongo el código a ver, si me podéis decir dónde tengo el error.
gracias de antemano.
Os pongo el código a ver, si me podéis decir dónde tengo el error.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<html>
<head>
<title>Pruebas almudena</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- <script type="text/javascript" language="javascript"></script> -->
<!-- <script type="text/javascript" language="javascript" src="js.js"></script> -->
<!-- ================================================================================-->
<script type="text/javascript" language="javascript">
var peticion;
function descargaArchivo(fichero)
{
if(window.XMLHttpRequest)
{
peticion = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
peticion = new ActiveXObject('Microsoft.XMLHTTP');
}
peticion.onreadystatechange = muestraContenido;
peticion.open('GET', fichero, true);
peticion.send(null);
}
function muestraContenido(fichero)
{
if(peticion.readyState == 4)
{
if(peticion.status == 200)
{
var ele_div=document.getElementById('cuerpo');
ele_div.innerHTML=peticion.responseText;
}
}
}
</script>
<!-- ================================================================================-->
</head>
<body>
<div>
<center>
<table>
<tr>
<td><a href='javascript:descargaArchivo("uno.html")'>uno</a></td>
<td></td>
<td><a href='javascript:descargaArchivo("dos.html")'>dos</a></td>
</tr>
</table>
</center>
</div>
<div id="cuerpo" name="cuerpo"></div>
</body>
</html>
gracias de antemano.
Valora esta pregunta
0