html set input值,html - set var value from input field value - Stack Overflow

I started short time ago with JSP, JSTL, HTML and JavaScript so here is my problem:

I need to set the value of a var the value of an input hidden. Other option is if it possible to compare using

the value of a variable that I sent with the request with the value of the hidden input.

Thanks.

Update

I've been trying but can't make it work.

I have this field that contains the id of and object. I also have the list with the objects so what I have to do is find the object related to that ID.

but if I do this:

The input text is empty but the text related to id1 displays 850 (i.e. the value is dinamic)

Any suggestion why is not working?

Update 2

I need the "multipart/form-data" because in the form I need to upload a picture. I understand how to get the parameters from Java, but since I'm not using the server but the JSP pages, there's any way to do it? Just need to read that input element and save it in a variable.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值