Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/07/2007, 03:52
luismi78
 
Fecha de Ingreso: febrero-2004
Mensajes: 85
Antigüedad: 20 años, 3 meses
Puntos: 0
Re: Como pasar variables entre funciones.

Lo he probado y en la ventana alert me sale undefined. Este es el código:

Cita:
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
var global;
function modificar() {
global = "Hola";
}

function usar() {
alert(global);
}
</script>
</head>

<body onLoad="javascript:usar();">

</body>
</html>
¿Qué puede estar mal?