我想将输入标签的值作为参数传递给href中的parameter(quantita)。我应该使用JavaScript来做到这一点吗?对不起,我的英语谢谢
<input type="text" id="qta_field" value="${item.value}"/><a href="updateItem?codice=${item.key.codice}&quantita=">update</a>
使用链接且不使用任何库的最简单方法:
<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>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句