
14/10/2009, 10:17
|
 | | | Fecha de Ingreso: octubre-2008 Ubicación: Madrid
Mensajes: 495
Antigüedad: 16 años, 4 meses Puntos: 66 | |
Respuesta: email cópiate/pégate todo esto entero en tu página (sustituyendo todo)
-----------------------------------------
<!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>
<title>Untitled Page</title>
<script type="text/javascript">
function rellenaTextBox()
{
var texto = '';
var chán = document.getElementById('chón');
var ch2 = document.getElementById('ch2');
var ch3 = document.getElementById('ch3');
if(chán.checked)
texto += chán.value + ';';
if(ch2.checked)
texto += ch2.value + ';';
if(ch3.checked)
texto += ch3.value + ';';
document.getElementById('tx_box').value = texto;
}
</script>
</head>
<body>
<div>
<input id="chón" onclick="rellenaTextBox();" type="checkbox" value="uno" />uno<br />
<input id="ch2" onclick="rellenaTextBox();" type="checkbox" value="dos" />dos<br />
<input id="ch3" onclick="rellenaTextBox();" type="checkbox" value="tres" />tres<br />
<input type="text" style="width:300px" id="tx_box" />
</div>
</body>
</html>
-------------------------------------------
hasta aquí (esto ya no... ;)
salu2 |