header("location:url"),该如何处理

header(location:url)因为种种原因,用ahref 无法链到指字页面.有关人士给出下列解决办法1,响应Area的onc

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/ ";