跳转:
js:
window.location="shopping?username="+username;
html:
<a href="shopping">
servlet:
request.getRequestDispatcher("/shopping.jsp").forward(request, response);
response.sendRedirect(request.getContextPath()+"/login.jsp?tip="+tip);
获得跳转的数据:
html/js: ${param.tip}
servlet: request.getParameter("info");
本文总结了不同场景下的页面跳转方法,包括JavaScript、HTML、Servlet等技术实现方式,并介绍了如何获取跳转参数。
128

被折叠的 条评论
为什么被折叠?



