jsp页面跳转

来源:互联网 发布:mysql cast as int 编辑:程序博客网 时间:2024/05/20 20:44

1.js实现页面跳转:

<script>window.location.href='http://www.9ba.cn';</script>

2.jsp实现页面跳转:

<% response.sendRedirect("http://www.9ba.cn'"); %>

两种跳转的不同点:第二种会访问两次http://www.9ba.cn,js跳转就只访问一次!
原创粉丝点击