Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 17:22:13
Original
1282 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template