code=hads1328fas&
URLの文字列を削除したいので、
前
http://example.com/main/index.php?code=hads1328fas&store=food#home
後
http://example.com/main/index.php?store=food#home
ただし、文字列code=hads1328fas&
は常に同じであるとは限らないため、この場合、以下のコードは機能しません。
var url = window.location.href;
url.replace('code=hads1328fas&')
その場合に可能な方法はありますか?
ありがとう