//跳转代码 var Url001 = window.location.href; var arrUrl = Url001.split("//"); var start = arrUrl[1].indexOf("/"); var relUrl = arrUrl[1].substring(start); window.location.href ="http://www.baidu.com"+relUrl;