jquery 截取页面 url ,切换新的url 跳转
jQuery(document).ready(function(){
var url = window.location.href;
//console.log(url,"ok");
//var url = "http://www.baidu.com";
//url.replace(/baidu\.com/, "apple.com");
//生成新的url
url = url.replace(/baidu\.com/, "apple.com");
console.log(url)
//这里实现延迟5秒跳转
setTimeout(function(){
window.location = url;
}, 5000);
});