Document. location. href and document. location. replace can be switched from page A to page B. The following describes the differences between them in document. location.
Both document. Location. href and document. Location. Replace can be switched from page a to page B, but their differences are:
After switching with document. Location.
1. Location:
Is an image in a Windows window. Its main function is to direct the current webpage to anotherHref is a property of a Web page. It can be used to direct another web page and refresh the page.
2.
A href = "#"> after clicking the link, the page will be rolled up to the top, # The default anchor is # top
After clicking the link, if you do not want to roll the page to the top, you can use
Js: Simple Method for getting the URL of the current page and window. location. href, window. location. href
Using JavaScript to get the URL of the current page seems complicated. If you think about the problem for the first time, many people may wonder which Javascript function is actually used.
Actually, no. The func
[JavaScript] obtain the URL of the current page and window. location. href, window. location. href
Using Javascript to get the URL of the current page seems complicated. If you think about the problem for the first time, many people may wonder which Javascript function is actually used.
Actually, no. The function of Ja
In js, the window. location. hrefwindow. location. href jump does not respond. ahyperlink onclick. Click to jump to a solution without a response problem. The error code is mainly in href = "#" here.
The Code is as follows:
Incorrect syntax, mainly in href = "#" here
The solution for window. location. href is invalid in IE6 browser. ie6location. href
This article describes how window. location. href in Internet Explorer 6 is invalid. Share it with you for your reference. The specific method is as follows:
Window.
1. Location. Replace means replacement.
The principle of this method is to replace the current historical record with the URL of the new page, so that there is only one page in the browsing history record.The return button will never become available
Onclick = "javascript: location. Replace (this. href );
2. Location.
Window. location. href usage (Dynamic Output jump), window. location
Location. href in javascript has many usage methods, mainly as follows.
Self. location. href = "/url" the current pa
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.