日期:2014-05-16  浏览次数:20406 次

header("location:url")
因为种种原因,用a   href 无法链到指字页面.有关人士给出下列解决办法

1,响应Area的onclick事件来跳转。

2,跳转方式用header( "location:url ");

服务器支持jsp脚本,但我不会JSP 不知道在js中如何使用header.


------解决方案--------------------
在JSP里用
<%@page contentType= "text/html;charset=utf-8 "%>
<%
response.addHeader( "Location ", "http://www.host.com/ ");
%>

或者,在JS里,也就是页面里,响应某个事件后调用
location.href = "http://www.host.com/ ";