佬唐

博客园 首页 新随笔 联系 订阅 管理

JavaScript页面跳转常用代码

JavaScript页面跳转常用代码
1.按钮式:
2.链接式:返回上一步
3.直接跳转式:
4.开新窗口:开新窗口
5.定时:使用js的setTimeout函数


这样页面在装入浏览器后5秒钟执行func函数,func函数使页面跳转至a.html


------------------------------------------------------------------------------------------
第一种:window.location.href
    

第二种:window.history.back(-1)
    

第三种:window.navigate("xxx.htm")
 

第四种:self.location='xxx.htm';
   

第五种:top.location='xx.jsp';
   
------------------------------------------------------------------------------------------
posted on 2009-08-11 08:49  佬唐  阅读(171)  评论(0)    收藏  举报