当前位置: 代码迷 >> Java Web开发 >> 怎么将查出的数据的id做成连接,点击后将值传给action
  详细解决方案

怎么将查出的数据的id做成连接,点击后将值传给action

热度:235   发布时间:2016-04-17 10:24:53.0
如何将查出的数据的id做成连接,点击后将值传给action
<c:forEach items="${list }" var="employee">
  <tr>
  <td height="25" align="center" width="120" class="b1_text_12_n">
  <input id="userCode" value="${employee.userCode}" type="hidden">
  <a href="../updateEmployee.action?userCode='${employee.userCode}'" >
  ${employee.userCode}
  </a>
  </td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.userName}</td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.status}</td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.sex}</td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.company.orgName}</td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.role.roleName}</td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.mobile}</td>
  <td height="25" align="center" width="120" class="b1_text_12_n">${employee.ocupation}</td>
  </tr>
  </c:forEach>

------解决方案--------------------
<a href="../updateEmployee.action?userCode=${employee.userCode}" >
不要那个单引号。
------解决方案--------------------
../
如果连action都进不了那你看是不是这个引起的、
------解决方案--------------------
action的路径问题。
  相关解决方案