简体   繁体   中英

How to set variable in jsp using jstl from input tag on same page?

I want to do something like

<from action="#">
    <input type="number" name="id1">
    .......
<form>
<c:set var="quantity" value="//value from input field here"/>

Is it possible?
Note: whole code is a single jsp file

假设您要获取input的提交值,可以执行以下操作:

<c:set var="user" value="${param.id1}" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM