1.js实现页面跳转:
<script>window.location.href='http://www.9ba.cn';</script>
2.jsp实现页面跳转:
<% response.sendRedirect("http://www.9ba.cn'"); %>
本文介绍了使用JavaScript和JSP实现页面跳转的方法,并对比了两种方式的主要区别。JavaScript跳转仅请求目标URL一次,而JSP的sendRedirect会导致两次请求。
1.js实现页面跳转:
<script>window.location.href='http://www.9ba.cn';</script>
2.jsp实现页面跳转:
<% response.sendRedirect("http://www.9ba.cn'"); %>
944

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