JSP是在您的服务器端运行的Java代码。
Javascript在您的浏览器上运行。
因此,您不能使用Javascript分配JSP变量。
表单提交或ajax是这种情况的正确选择。
Ajax代码段。
onSelect: function(index, row) { $.ajax({ url: '/your-url', // path to your url which gets this ajax request method: 'get', // or a http method you want to use data: { value: row.value }, success: function(response) { alert('Boom!' + response); } });}有关更多信息,请参见jQuery Ajax API文档。有很多选择。



