jQuery重定向如何跳转到另一个网页

如何在jQuery中跳转到另外一个网页HTML。
其实下面我列举的几种方法。我们可以利用http的重定向来跳转

window.location.replace("https://blog.csdn.net/qq_43294510);

使用href来跳转

window.location.href = "https://blog.csdn.net/qq_43294510";

使用jQuery的属性替换方法

$(location).attr('href', 'https://blog.csdn.net/qq_43294510');
$(window).attr('location','https://blog.csdn.net/qq_43294510');

猜你喜欢

转载自blog.csdn.net/qq_43294510/article/details/89576000
今日推荐