我在jsp中有一行这样的代码:
<button name="CurrentDelete" value="${ra_split}" type="submit">Delete</button>
在我的 Controller 中我使用:
@RequestParam String CurrentDelete
当我点击“删除”按钮时,我试图将 ${ra_split} 的值传递到 Controller 中,但我得到的只是文本“删除”的值。这是为什么?
最佳答案
这里是解释
If you use the element in an HTML form, Internet Explorer, prior version 8, will submit the text between the and tags, while the other browsers will submit the content of the value attribute.
关于java - Spring MVC - 如何将数据从jsp页面的按钮传递到 Controller ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29045134/