var f="http://www.google.com"; 'f' 是一个变量,f 中存储了一个链接。 有没有办法放置一个可以将我们重定向到变量 f 中的链接的链接?
最佳答案
Is there anyway to place a link which can redirect us to a link in variable f?
使用window.location
Docs :
var f="http://www.google.com";
window.location = f;
关于javascript - 如何重定向到链接存储在变量中的页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9601513/