Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/12/2007, 06:51
Avatar de Kelpie
Kelpie
 
Fecha de Ingreso: febrero-2002
Ubicación: NorthSpain
Mensajes: 609
Antigüedad: 22 años, 3 meses
Puntos: 8
Re: Ayuda con script

Para el primer tema:

Código HTML:
<html>
<head>
	<title>Untitled</title>
	<script>
		function sacaMensaca(){
			obj=window.document.getElementById("texto");
			salida=obj.value;
			if (salida==""){
				alert ("Escribe algo, patán");
			}else{
				alert(salida);
			}
			obj.focus();
			return true;
		}
	</script>
</head>

<body>
	<form action="#" >
		<input type="text" name="texto" /><br />
		<input type="button" name="env" value="Mostrar"  onclick="sacaMensaca()" />
	</form>
</body>
</html> 
__________________
Kelpie