简体   繁体   English

如何将jsp页面中存在的参数传递给控制器​​/视图?

[英]How to pass parameters present in a jsp page to controller/view?

I have a jsp/html page in the following format: 我有以下格式的jsp / html页面:

Name      id       date-Modified       Download
a          1        1/2/3               button
b          2        1/2/3               button
c          3        1/2/3               button

So when the user clicks on any of the above download buttons, I want that corresponding id and Name to be passed to my view/Controller . 因此,当用户单击以上任一下载按钮时,我希望将相应的 id和Name传递给我的view/Controller

I am unable to figure out how I can do that. 我无法弄清楚该怎么做。 Thanks in advance. 提前致谢。

使用ajax,当您单击按钮时,在js函数中,您可以使用jquery获得被单击的行的父级,使用jquery您可以获取此行中所需的所有内容,将它们变成对象,传递给控制器​​,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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