I have a group of labels and I want that when you select 1 or several, the VALUES of each of the labels in an INPUT TEXT is shown or displayed. With this code I already show ONLY 1 OF THE LABELS, I still can not get the value of more than 2 labels <a>
<input class="tf w-input" id="node" maxlength="256" placeholder="Vida nocturna, el aeropuerto " type="text">
<a class="btn desc fav w-button" id="parque" name="parque" onclick = "add(this);" >PARQUE</a>
<a class="btn desc fav w-button" id="parque" name="parque" onclick = "add(this);">CENTRO COMERCIAL</a>
<a class="btn desc fav w-button" id="parque" name="parque" onclick = "add(this);">GYM</a>
This is the Javascript function with which I get the value of just PARK, the other values I can not show.
function add(x)
{
var valor = document.getElementById("parque").innerHTML;
document.interes.node.value = valor;
}
I hope you can support me, I appreciate it.