jsp中超链接传值使用键值对格式,多个键值对之间用&分隔,即
<a href="show.jsp?name=tom&pass=123&score=78,5">连接</a>
取值则使用request对象即可
<%
String username=request.getParameter("name");

String userpass=request.getParameter("pass");
String score=request.getParameter("score");
%>
注意:
1、超链接传值传递的都是String类型,如果需要其他类型,则需要进行类型转换
2、超链接传值有长度限制,最长不能超过255个字符,从?后开始算起

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-07-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
  • 2021-10-12
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
相关资源
相似解决方案