您的位置:首页 > 技术中心 > 前端框架 >

jquery中怎么跳转页面

时间:2020-11-19 10:02

jquery中实现跳转页面的方法:可以通过使用jquery的属性替换方法来实现跳转,如【$(location).attr('href', 'xxxx://xxx.xxx.xxx');】。

jquery跳转页面的方法有以下几种:

(学习视频分享:jquery视频教程)

1、利用http的重定向来跳转

window.location.replace("http://www.gxlsystem.com");

2、使用href来跳转

window.location.href = "http://www.gxlsystem.com";

3、使用jQuery的属性替换方法来实现跳转

$(location).attr('href', 'http://www.gxlsystem.com');
$(window).attr('location','http://www.gxlsystem.com');
$(location).prop('href', 'http://www.gxlsystem.com')

相关推荐:js教程

以上就是jquery中怎么跳转页面的详细内容,更多请关注www.gxlsystem.com其它相关文章!

本类排行

今日推荐

热门手游