Ver Mensaje Individual
  #5 (permalink)  
Antiguo 03/01/2008, 12:07
Avatar de xcars
xcars
 
Fecha de Ingreso: mayo-2005
Ubicación: El Salvador
Mensajes: 753
Antigüedad: 19 años
Puntos: 4
Re: Aumentar filas a una tabla html al dar click

este codigo lo pones en tu etiqueta HEAD
Código:
			function addFriend() {
				fieldCount++;
				if(fieldCount<=10)
				{
				var newFriend = document.createElement('input');
				newFriend.type = 'text';
				newFriend.name = 'friend' + fieldCount;
				newFriend.id = 'friend' + fieldCount;
				newFriend.setAttribute('attributeName','attributeValue')
				newFriend.setAttribute('maxlength','8')
				newFriend.setAttribute('size','12')
				document.getElementById('fs').appendChild(newFriend);
				}
El CSS
Código:
		<style type="text/css">
			input {
				display: block;
				margin-bottom: 2px;
			}
			button{
				float: right;
			}
			fieldset {
				border: 1px solid black;
			}
		</style>
En el html
Código HTML:
 <fieldset id="fs-principal">
				<legend> Enviar Estampa </legend>
			<label for="you">Codigo de Verificacion de tu Estampa Ej. 25426</label>
			<input type="text" name="codigo_stamp" id="stamp" maxlength="12" size="12"  ><br/>
			<label for="you">TU movil</label>
			<input type="text" name="you" id="you" maxlength="8" size="12" ><br/>
			<label for="you">Nickname o Firma</label>
			<input type="text" name="nick" id="nick" size="12" maxlength="8" >

			<fieldset id="fs">
				<legend>Enviar al movil de mis Amigos</legend>
				<button onclick="addFriend(); return false;" class="mas" >
				</button>
				<input type="text" name="friend1" id="friend1" maxlength="8" size="12">
			</fieldset> 
bueno algo asi es, he tenido que ir cortando las partes innecesarias pero si no te funciona de entrada, pues puede ser que borre algo que no debia, pero es la idea, la clave esta en el javascript, si lo entiendes, lo podras resolver.
__________________
Con Microaplicaciones puedes hacer tu tienda en línea de forma sencilla y rápida, sin costos ocultos y con mucha responsabilidad.