我想一打开网页就可以跳转到某个网址上,怎么做?谢谢!
<script language=javascript>
function window.onload()
{
window.open ("a.asp", "newwindow", "height=250, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
}
</script>
要 跳转的网页开始处:
<%
response.buffer=true
response.redirect"你要跳转的网页"
%>
<%Response.Redirect "index.htm"%>
ASP:
<%Response.Redirect "网页地址"%>
JS:
location = ("网页地址");
如果空间支持asp:
Response.Redirect="URL"
否则用
<script>
location.href="URL"
</script>
404错误,是说网页找不到。
<%Response.Redirect "网页地址"%>
语法肯定正确。
用<response.redirect"网页地址"%>时不能向浏览器输出任何信息,否则会报错
我按 wauo(泪尽北枝花) 说的那样做,但是IE地址栏中却是:
http://www.abc.com/URL
成了这样了!
还有用ASP的<%Response.Redirect "网页地址"%>怎么是404错误呢?
我把ASP语句改成:"response.write "hi" 试了一下是好的.
原因:
修改:Response.Redirect="URL"
否则用
<script>
location.href="URL"
</script>
URL="http://www.163.com"
http不可以少!否则,默认为相对路径~
Response.Redirect="URL"
修改:
response.redirect "http://www.163.com"
404的错误是网页找不到。
你的response.redirect “网页地址”,这个地址肯定不对。
打开网页就转向用windows.open比较好,是jiavascript的函数