7
JavaScriptで相対URLにリダイレクトする
問題があります。JavaScript経由で上のディレクトリにリダイレクトしたいのですが。私のコード: location.href = (location.href).substr(0, (location.href).lastIndexOf('folder')); URLは次のようになります。 example.com/path/folder/index.php?file=abc&test=123&lol=cool リダイレクトはこれに影響します: example.com/path/&test=123&lol=cool しかし、これが欲しい: example.com/path/ どうすればできますか?
363
javascript
url
redirect