<script>
function jump()
{
//顶层窗口跳转
//top.location.href='http://www.baidu.com';
//父层窗口跳转
//parent.location.href='http://www.baidu.com';
//以下均为本页面跳转
//window.location.href="http://www.baidu.com";
//location.href="http://www.baidu.com";
//self.location.href="http://www.baidu.com";
//this.location.href="http://www.baidu.com";
//location.href="http://www.baidu.com";
//以上。
}
</script>
引文:http://www.cnblogs.com/Qian123/p/5345298.html
location href的几种用法
最新推荐文章于 2024-05-11 17:52:52 发布
本文介绍了一种使用JavaScript进行网页跳转的方法,提供了多种跳转方式的示例代码,包括针对不同浏览器环境下的顶层窗口、父层窗口及当前页面的跳转。
2480

被折叠的 条评论
为什么被折叠?



