Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/06/2013, 04:23
Avatar de jumago
jumago
 
Fecha de Ingreso: marzo-2009
Mensajes: 34
Antigüedad: 15 años, 1 mes
Puntos: 0
Respuesta: Poner Javascript en un lugar deseado de la página

Hola Pirruman, perdona por no haber puesto el ejemplo del código mío. Quiero poner el Javascript que salga en una parte, como por ejemplo en la segunda fila de esta tabla:

<html>
<head>
<title>pruebas</title>

<script src="externo.js" language="javascript" type="text/javascript"></script>

</head>

<body>
<table width="50%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>Enlazar aquí el externo.js</td>
</tr>
</table>
</body>
</html>


El Javascript externo es de un pequeño calendario con la fecha actual, llamado 'externo.js':

<script languaje="JavaScript">
mesarray=new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio","Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
diaarray=new Array( "Domingo","Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado");
hoy = new Date();
dias = hoy.getDate();
dia = hoy.getDay();
mes = hoy.getMonth();
mes=mesarray[mes];
dia =diaarray[dia];
anno = hoy.getYear();
if (anno <200)
anno = anno+1900;
document.write('<TABLE WIDTH="60" height="30" BORDER="0" BGCOLOR="#FFFFFF"><TR><TD><CENTER>');

document.write('<FONT SIZE="2" COLOR="#000000">'+dia+'</FONT><br>');
document.write('<FONT SIZE="4" COLOR="#000000" FACE="Arial"><B>'+dias+'</B></FONT><br>');
document.write('<FONT SIZE="2" COLOR="#000000"> <B>'+mes+'</B></FONT><br>');
document.write('<FONT SIZE="2" COLOR="#000000">'+anno+'</FONT><br>');

document.write('</CENTER></TR></TD></TABLE>');
</script>

Espero me puedas ayudar