Pass input tag value to as href parameter

html, javascript

Solution

The easiest way to do it with link and without any library:

<input type="text" id="qta_field" value="${item.value}"/>
<a href='' onclick="this.href='updateItem?codice=${item.key.codice}&quantita='+document.getElementById('qta_field').value">update</a>

Problem

I want to pass the value of input tag as parameter(quantita) in href. Should i use javascript to do this?Sorry for my english Thanks ``` <input type="text" id="qta_field" value="${item.value}"/><a href="updateItem?codice=${item.key.codice}&quantita=">update</a> ```

Original source