Home  >  Article  >  Web Front-end  >  Introduction to the differences between window.navigate and window.location.href_Basic knowledge

Introduction to the differences between window.navigate and window.location.href_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 17:22:131254browse

The first thing to explain is that window.navigate and window.location.href both implement page link jumps. Their differences will be introduced below.

window.navigate("http://jb51.net/") This method is only for IE and does not apply to other browsers such as Firefox. In the HTML DOM Window Object, the window is not listed at all. .navigate method, so use this method as little as possible, and it is best to forget it.

The location attribute is compatible with all browsers. Therefore, it is more reliable to use this when implementing page jumps, such as:

Script Home

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn