
08/06/2011, 07:30
|
 | | | Fecha de Ingreso: marzo-2011 Ubicación: localhost
Mensajes: 796
Antigüedad: 14 años, 1 mes Puntos: 192 | |
Respuesta: Al hacer clic en Href enviar el valor a un input Así?
Ver: http://jsbin.com/ucika3
Código:
Código HTML:
Ver original<!DOCTYPE html> function llenarInput(butt){ var valor = butt.innerHTML; var inputUno = document.getElementById('inputUno'); var inputDos = document.getElementById('inputDos'); if(inputUno.value==''){inputUno.value = valor;} else if(inputDos.value==''){inputDos.value = valor;} } <input type="text" id="inputUno" /> <input type="text" id="inputDos" />
|