js跳转页面的方法大全: 1.直接跳转到指定页面 <script> window.location.href="http://www.02405.com"; </script> 1 <script> window.location.href="http://www.02405.com"; </script> 2.在新窗体中打开指定页面 <script> window.open("http://www.02405.com"); </script> 1 <script> window.open("http://www.02405.com"); </script> 3.跳转到上一页(返回) <script> window.history.back(-1); </script> 1 <script> window.history.back(–1); </script> 4.在框架(iframe)中跳转 <script> //在框架内(当前html页面)中跳转 self.location.href="http://www.02405.com"; //在框架外(顶层html页面)中跳转 top.location.href="http://www.02405.com"; </script> 1 <script> //在框架内(当前html页面)中跳转 self.location.href="http://www.02405.com"; //在框架外(顶层html页面)中跳转 top.location.href="http://www.02405.com"; </script> 5.延时跳转(倒计时跳转) <script> var i = 5;//倒计时5秒钟 var timer = setInterval(function(){ i–; if(i<=0){ window.location.href = "http://www.02405.com"; } },1000); </script> 1 <script> var i = 5;//倒计时5秒钟 var timer = setInterval(function(){ i–; if(i<=0){ window.location.href = "http://www.02405.com"; } },1000); </script> 赞(0) 未经允许不得转载:主机阁 » js跳转页面的方法大全 上一篇Amazon CloudFront:香港/日本/韩国/台湾等CDN服务,首年免费,每月50GB流量;100GB亚洲流量,月付7美金 下一篇win7下php运行getenv('REMOTE_ADDR')导致fastcgi停止运行的解决办法 相关推荐umami:一款简单、易用、自行部署的网站统计程序【转载】自动获取cloudflare的ip解决假墙用对象存储挖矿教程:不用买硬盘!来看下AWS推出的Chia奇亚币云挖矿解决方案阿里云服务器ECS更换公网IP地址的方法教程解决火车头采集器https报Object reference not set to an instance of an object错误Centos 7 Samba服务安装方法详解腾讯轻量服务器(2核4G)DD安装Windows 2008 R2的踩坑记录ESXI6.7通过命令行直接升级到7.0教程