window.navigate(sURL)方法是针对IE的,不适用于FF,在HTML DOM Window Object中,根本没有列出window.navigate方法。

要在javascript中导航,不是调用window对象的某个方法,而是设置它的location.href属性,location属性是每个浏览器都支持的。

比如:<span onclick=”javascript:window.location.href=’#top’”>top</span>

window.navigate 与 window.location.href 的使用区别介绍的更多相关文章

  1. document.location.reload();与location.href='xxx'的区别

    document.location.reload();会重新加载页面,onload事件会被触发. location.href='xxx'刷新页面,onload事件不会触发.

  2. .Vue-router跳转和location.href有什么区别

    使用location.href='/url'来跳转,简单方便,但是刷新了页面:使用history.pushState('/url'),无刷新页面,静态跳转:引进router,然后使用router.pu ...

  3. js实现网页防止被iframe框架嵌套及几种location.href的区别

    首先我们了解一下几种location.href的区别简单的说:几种location.href的区别js实现网页被iframe框架功能,感兴趣的朋友可以了解下 首先我们了解一下:window.locat ...

  4. location和location.href跳转url的区别

    使用 location = url  跳转,如果本地之前已经载入过该页面并有缓存,那么会直接读取本地的缓存,缓存机制是由本地浏览器设置决定的.状态码为:  200 OK (from cache) . ...

  5. window.location.href/replace/reload()--页面跳转+替换+刷新

    一.最外层top跳转页面,适合用于iframe框架集 top.window.location.href("${pageContext.request.contextPath}/Login_g ...

  6. 5. window.location.href/replace/reload()--页面跳转+替换+刷新

    1.window.location=url; window.location 对象用于获得当前页面的地址 (URL),并把浏览器重定向到新的页面. 一.最外层top跳转页面,适合用于iframe框架集 ...

  7. window.location.assign和window.location.href区别

    window.location.assign和window.location.href区别 window.location.assign(url)和window.location.href=url实现 ...

  8. window.top.location.href 和 window.location.href 的区别

    "window.location.href"."location.href"是本页面跳转. "parent.location.href" 是 ...

  9. 关于js中window.location.href,location.href,parent.location.href,top.location.href的用法

    "window.location.href"."location.href"是本页面跳转 "parent.location.href"是上一 ...

随机推荐

  1. group

    学习Linq时,经常会遇到Linq使用Group By问题,这里将介绍Linq使用Group By问题的解决方法. 1.计数 var q = from p in db.Products group p ...

  2. Java中设置classpath、path、JAVA_HOME的作用

    Thinking in Java对classpath作用的解释 Java 解释器的工作程序如下: 首先,它找到环境变量CLASSPATH(将Java 或者具有Java 解释能力的工具——如浏览器——安 ...

  3. GoLang之方法与接口

    GoLang之方法与接口 Go语言没有沿袭传统面向对象编程中的诸多概念,比如继承.虚函数.构造函数和析构函数.隐藏的this指针等. 方法 Go 语言中同时有函数和方法.方法就是一个包含了接受者的函数 ...

  4. .NET安全审核检查表

    书籍名称:Web安全设计之道 -.NET代码安全,界面漏洞防范与程序优化   .NET安全审核检查表   检查项 任务描述 设计环节     Security descisions should no ...

  5. 【转】asp.net mvc 页面跳转

    1.使用传统的Response.Redirect例如string url = "/account/create";Response.Redirect(url); 1.Server. ...

  6. 弹出框三 之 sweetalert

    1下载sweetalert 2.引入到项目中 <link href="~/Content/sweetalert.css" rel="stylesheet" ...

  7. sql是如何执行一个查询的!

    引用自:http://rusanu.com/2013/08/01/understanding-how-sql-server-executes-a-query/ Understanding how SQ ...

  8. Python网络socket学习

    Python 网络编程 Python 提供了两个级别访问的网络服务.: 低级别的网络服务支持基本的 Socket,它提供了标准的 BSD Sockets API,可以访问底层操作系统Socket接口的 ...

  9. nyoj 236拦截导弹 简单动归(java)

    C/C++: #include<stdio.h> int main() { // freopen("250.txt","r",stdin); ],b ...

  10. Apache服务器httpd.exe进程占用cpu超过50%的解决方法

    httpd.exe进程占用cpu超过50%,关闭掉Apache服务,cpu应用率立刻下降到0.  重新启动Apache又出现占用cpu高的情况.  原因是:httpd.exe和防火墙配置有冲突. 解决 ...