JQuery的位置Href?
可能重复:
如何在jQuery / JavaScript中创buildredirect页面?
我记得jQuery中有一个redirect函数。
它就像:
$(location).href('http://address.com') 但究竟是什么呢? 我不记得,也找不到Google。
不需要jQuery。
 window.location.href = 'http://example.com'; 
使用:
 window.location.replace(...) 
看到这个问题的更多信息:
如何在JavaScript / jQuery中redirect到另一个网页?
或者也许是你记得的:
 var url = "http://stackoverflow.com"; $(location).attr('href',url); 
更轻松 :)
 location.href = 'http://address.com'; 
要么
 location.replace('http://address.com'); // <-- no history saved. 
我想你正在寻找
 window.location='http://someUrl.com'; 
这不是jQuery,它是纯粹的js。
 理想情况下,你想要使用的是window.location.replace(...) 
在这里看到这个答案全面探索: 如何redirect到JavaScript / jQuery的另一个网页?
你可以使用Javascript:
 window.location = 'http://address.com';