
22/01/2011, 15:56
|
| | Fecha de Ingreso: julio-2010
Mensajes: 29
Antigüedad: 14 años, 8 meses Puntos: 0 | |
Como obtener un caracter de una cadena? Buenas tardes mi consulta es esta...
tengo un texto:
Elija Pais:
(aca tengo 4 radiobuttons) que son 4 paises y kiero que pueda elejir 1 de los 4
y al elejirlo obtener su letra inicial
A= Alemania
C=Corea
P=Peru
como hago eso para poder obtenerlo?
tengo ste codigo pero nose aun como ponerlo, recien tengo 1 semana studiando esto.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>TODO supply a title</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#btn01").click(function(){
//var valor = $("#txt01").val();
var tipo=$ ;
//alert("El valor es: " + valor)
})
});
</script>
</head>
<body>
<p>
Seleccione Pais : <br/>
Alemania<input type="radio" id="rd01"/><br/>
China<input type="radio" id="rd02"/><br/>
Egipto<input type="radio" id="rd03"/><br/>
Holanda<input type="radio" id="rd04"/><br/>
</p>
</body>
</html> |