本节内容:
实现页面跳转的多种方法。
一,JavaScript 跳转
方法一:
复制代码 代码示例:
window.location= "http://www.jbxue.com";
方法二:
复制代码 代码示例:
document.location = "http://www.jbxue.com";
方法三: (带进度条)
复制代码 代码示例:
跳转到jbxue.comloading...
size=46 name=chart>
var bar=0
var line="||"
var amount="||"
count()
function count(){
bar=bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99){
setTimeout("count()",100);
}else{
window.location = "http://www.jbxue.com/";
}
}
二,html页面跳转
复制代码 代码示例:
三,动态页面跳转
方法一: PHP 跳转
复制代码 代码示例:
header("location: http://www.jbxue.com");
?>
方法二: ASP 跳转
复制代码 代码示例:
'--//例1
response.redirect "http://www.jbxue.com"
'--//例2
Dim ID1
Dim ID2
dim str
ID1 = Request("forumID")
ID2 = Request("threadID")
str="/blog/threadview.asp?forumID="& ID1 &"&threadID=" & ID2
response.redirect str
%>
>>> 可能感兴趣的文章:
PHP 页面跳转的多种方法总结
PHP Header 页面跳转注意事项
php url重定向(页面跳转)的代码
php实现页面跳转的别样方法
php实现页面跳转的几种方法
header跳转和include包含问题实例分析