Home > Web Front-end > JS Tutorial > Summary of the differences between document.url and location.href of the current web page_javascript skills

Summary of the differences between document.url and location.href of the current web page_javascript skills

WBOY
Release: 2016-05-16 19:04:59
Original
1393 people have browsed it

The Fourth Edition of the Definitive Guide to JAVASCRIPT says that there is a difference between the two.
See document.URL section.
[document.URL is the accessed document URL, and window.location.href is the real document URL
I don’t understand.
Document.url may change after server redirection, but window.location.href always refers to the URL used to access the web page.
document.url can only be used as a read-only string

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