Home > Web Front-end > JS Tutorial > Use jQuery to make page jumps

Use jQuery to make page jumps

php中世界最好的语言
Release: 2018-04-23 16:52:16
Original
2460 people have browsed it

This time I will bring you the jQuery to do page jumps and the precautions for using jQuery to do page jumps. The following is a practical case, let’s take a look.

So, today we will talk about how to jump to another web page HTML in jQuery.
In fact, the several methods I listed below do not necessarily use jQuery, and some also use the native methods of Javascript, so it can be regarded as a summary of front-end jumps.

We can use http redirection to jump

window.location.replace("http://www.php.cn ");

Use href to jump

window.location.href = "http://www.php. cn";

Use jQuery's attribute replacement method

$(location).attr('href', 'http://www.jb51.net');
$(window).attr('location','http://www.jb51.net');
$(location).prop('href', 'http://www.jb51.net')
Copy after login

Finally, I wish everyone a happy day. No more

# I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Use case of $(function() {}) in jQuery

jQuery operates html element click Detailed explanation of the incident

The above is the detailed content of Use jQuery to make page jumps. For more information, please follow other related articles on the PHP Chinese website!

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