Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/10/2011, 07:32
Avatar de Lynxcraft
Lynxcraft
 
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 16 años, 5 meses
Puntos: 51
Respuesta: Copiar de la informacion de un input text a mi pagina.

primero acostumbrarte a poner los valores de cada paramento entre comillas
de esta manera<input type="button" id="ejecutar" name="ejecutar" value="ejecutar">

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script type="text/javascript" language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script language="javascript">
$(document).ready(function(){
	$('#ejecutar').click(function(){
		$('#obtenerinfo').html(function(){
			var mensaje='';
			mensaje += 'NOMBRE: ' + $('#nombre').val();
			mensaje += '<br />';
			mensaje += 'EDAD: ' + $('#edad').val();
			return mensaje;
		});
	});
});
</script>

</head>

<body>
<input type="text" id="nombre" name="nombre"><br>
<input type="text" id="edad" name="edad"><br>
<input type="button" id="ejecutar" name="ejecutar" value="ejecutar">
<div id=obtenerinfo> aqui aparecera el nombre y la edad </div>

</body>
</html>
__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft