UIWebVIew Javascript Document.location

UIWebVIew Javascript Document.location,javascript,ios,uiwebview,console,document,Javascript,Ios,Uiwebview,Console,Document,我无法让我的UIWebView基于javascript更改位置。虽然这看起来有点多余,但这是必要的,因为当document.location已知时,客户端的网站会存储cookie。然而,当我尝试访问他的站点的下一部分时,它将不会打开 这是密码 [self.webView stringByEvaluatingJavaScriptFromString:@"document.location = 'http://www.nextLink.com'"]; 然而,这似乎没有起到任何作用。document

我无法让我的UIWebView基于javascript更改位置。虽然这看起来有点多余,但这是必要的,因为当document.location已知时,客户端的网站会存储cookie。然而,当我尝试访问他的站点的下一部分时,它将不会打开

这是密码

[self.webView stringByEvaluatingJavaScriptFromString:@"document.location = 'http://www.nextLink.com'"];
然而,这似乎没有起到任何作用。document.write方法同样有效


谢谢

您尝试过使用
窗口.位置
吗?

您尝试过使用
窗口.位置