Java 从html中的行中获取值并在jsp中使用

Java 从html中的行中获取值并在jsp中使用,java,html,jsp,Java,Html,Jsp,我有一个jsp,其表如下所示: <table style="width:100%"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Adress</th> <tr> </thead> <tbody> //here is

我有一个jsp,其表如下所示:

 <table style="width:100%">
   <thead>
     <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Adress</th>
     <tr>
   </thead>
   <tbody>
    //here is a loop filling the table
     <tr data-toggle="modal" data-target="#modal">
       <div>
          <td>${id}</td>
          <td>${name}</td>
          <td>${adress}</td>
       </div>
     <tr>
  </tbody>
 </table>

身份证件
名字
地址
//这是一个充满表格的循环
${id}
${name}
${adress}
所以我想在模式中使用表中的id(这是一个弹出对话框)来获取一些信息,但我无法获取用户正在按下的行的值。
任何帮助都会有帮助

我建议使用javascript来实现这一点。您可以将
onclick
事件添加到div中,其中行的ID作为参数传递给javascript函数。然后打开模态对话框

<div onclick="openPopup(${id})">