0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
textarea con contador de caracteres |
|
|
<SCRIPT language="JavaScript" type="text/javascript">
function contador (campo, cuentacampo, limite) {
if (campo.value.length > limite) campo.value = campo.value.substring(0, limite);
else cuentacampo.value = limite - campo.value.length;
}
</script><br />
<table style="width: 400px; height: 163px" cellspacing="1" cellpadding="1" width="400" align="center" border="4">
<tbody>
<tr>
<td>
<form name="form1">
<p align="center">solo puedes entrar 1111 caracteres. <textarea rows="4" cols="48" onKeyDown="contador(this.form.mensaje,this.form.remLen,1111);" onKeyUp="contador(this.form.mensaje,this.form.remLen,1111);" name="mensaje"></textarea> te quedan todavia<input readonly="readonly" maxlength="3" size="3" name="remLen" value="1111" type="text" /><br />
selecciona y copia en hoja de texto</p>
</form>
</td>
</tr>
</tbody>
</table>
<center></center>
|
|
|
|
|
|
|
|
|
|
|
|
|